我需要更多关注此事。我的预检请求失败,405方法不允许。
据我所知,它应该有效。这是我的要求:
tmux new -d -s dev -n server -c ~/projects
tmux send-keys -t dev:server 'make run-server' Enter
响应:
OPTIONS http://diffDomain/spf/v1/user/user@example.com/password/change
HTTP/1.1
Host: diffDomain.com
Connection: keep-alive
Access-Control-Request-Method: PUT
Origin: http://www.example.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36
Accept: */*
Referer: http://www.example.com/appName/index.html
Accept-Encoding: gzip, deflate
Accept-Language: en-US,es-US;q=0.8,es;q=0.6,en;q=0.4
我正在等待访问服务器,以便我可以向HTTP/1.1 405 Method Not Allowed
Date: Thu, 14 Sep 2017 02:06:30 GMT
Server: Apache/2.4.7 (Ubuntu)
Access-Control-Allow-Methods: POST, GET, PUT, OPTIONS, DELETE
X-Powered-By: PHP/5.5.9-1ubuntu4.20
Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: Content-Type, api_key, Authorization, Accept
Content-Length: 0
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: application/json
行添加Access-Control-Request-Method。那会有帮助吗?
我只需要一些眼睛,因为我今天已经调试了几个小时,但我还没有访问服务器。
当我这样做@sideshowbarker时,我得到:
Access-Control-Allow-Headers
答案 0 :(得分:0)