hi trying send patch
request servicestack angularjs, getting error:
method patch not allowed access-control-allow-methods.
this request headers:
connection: keep-alive pragma: no-cache cache-control: no-cache access-control-request-method: patch origin: user-agent: mozilla/5.0 (windows nt 6.1; wow64) applewebkit/537.36 (khtml, gecko) chrome/45.0.2454.85 safari/537.36 access-control-request-headers: accept, content-type accept: */* referer: https://pankajb1.dev.ma.net/ui/static/index.html accept-encoding: gzip, deflate, sdch accept-language: en-gb,en-us;q=0.8,en;q=0.6
this response:
http/1.1 200 ok cache-control: private content-length: 0 server: microsoft-iis/7.5 x-powered-by: servicestack/3.959 win32nt/.net access-control-allow-origin: * access-control-allow-methods: get, post, put, delete, options access-control-allow-headers: content-type x-aspnet-version: 4.0.30319 x-powered-by: asp.net date: fri, 25 sep 2015 20:23:51 gmt
the corsfeature
default didn't allow patch (it will in next v4.0.48 release).
in meantime can specify methods should available cors when registering corsfeature
, e.g:
plugins.add(new corsfeature( allowedmethods: "get, post, put, delete, patch, options"));
Comments
Post a Comment