-
Notifications
You must be signed in to change notification settings - Fork 521
Open
Description
当我进行跨域请求时(OPTIONS方法),就会提示我 405 Not Allowed,感觉在PHP中设置的header并没有起作用。我想肯定时nginx拦截了请求。但是假如我自己修改nginx配置的话,那肯定没有PHP header函数方便。我想问下,咱们的demo网站是如何处理这个问题的?因为我看到咱们也是用的Ngxin。希望得到回答,谢谢~
下面是我在本地使用telnet模拟发送http options 请求得到的结果:
OPTIONS / HTTP/1.1
Host: www.test.com
HTTP/1.1 405 Not Allowed
Server: nginx
Date: Mon, 07 May 2018 09:11:50 GMT
Content-Type: text/html
Content-Length: 166
Connection: keep-alive
<html>
<head><title>405 Not Allowed</title></head>
<body bgcolor="white">
<center><h1>405 Not Allowed</h1></center>
<hr><center>nginx</center>
</body>
</html>
Metadata
Metadata
Assignees
Labels
No labels