最贊回答 / 慕工程255496
找到問題了,是頁面上。我用的ajax請(qǐng)求,不是老師所寫的
$.getJSON而且沒寫明請(qǐng)求方式type:“get”,所以瀏覽器校驗(yàn)不通過。
2018-11-23
已采納回答 / dy_ygs
這跟nginx有關(guān),即只有response code為以下value時(shí),才add the specified field:Adds the specified field to a response header provided that the response code equals 200, 201, 204, 206, 301, 302, 303, 304, or 307. A value can contain variables.也就是說你本身的接口返回了404,導(dǎo)致add_header沒有...
2018-10-26