Ruby on rails RFC 2068中未定义方法修补程序,Servlet API不支持该方法修补程序
我不能100%确定错误来自何处,但我认为这与我的nginx配置文件有关。我正在尝试使用restangular从Angularjs应用程序执行补丁请求,当我尝试在生产服务器上执行此操作时,控制台中的开发人员工具出现以下错误Ruby on rails RFC 2068中未定义方法修补程序,Servlet API不支持该方法修补程序,ruby-on-rails,angularjs,ruby-on-rails-4,nginx,jetty,Ruby On Rails,Angularjs,Ruby On Rails 4,Nginx,Jetty,我不能100%确定错误来自何处,但我认为这与我的nginx配置文件有关。我正在尝试使用restangular从Angularjs应用程序执行补丁请求,当我尝试在生产服务器上执行此操作时,控制台中的开发人员工具出现以下错误 PATCH https://localhost:9000/api/v1/projects/12 501 (Method PATCH is not defined in RFC 2068 and is not supported by the Servlet API) 从我到目
PATCH https://localhost:9000/api/v1/projects/12 501 (Method PATCH is not defined in RFC 2068 and is not supported by the Servlet API)
从我到目前为止阅读的内容来看,nginx默认情况下不允许补丁请求,这是真的吗?如果是真的,您如何允许这种方法类型
nginx的errors.log是空的,但在我的access.log中,我有下面的内容,它告诉我nginx没有任何问题,它是其他什么
0.0.0.10 - - [11/Nov/2015:09:09:16 +0000] "PATCH /api/v1/projects/12 HTTP/1.1" 501 0 "https://0.0.0.1/ss/projects" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36" "-"
是否有人可以确认这是nginx问题还是其他问题,以及我可以尝试解决什么问题。以下是我的nginx.conf文件中的位置
,如果您需要查看其他内容,请告诉我:
location / {
default_type text/plain;
root /usr/share/nginx/html/ss/dist/;
try_files $uri $uri/ /index.html;
}
location /api {
client_max_body_size 1000m;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:8080/api;
proxy_read_timeout 360s;
}
原来是Jetty造成了问题,因为Jetty不接受修补程序HTTP方法-所以原来是Jetty造成了问题,因为Jetty不接受修补程序HTTP方法-