My backend implements a POST to http://api.domain.com/resources with the following response :
Status Code : 303 See Other
Location header : http://api.domain.com/resources/resourceId
I use node-http-proxy (through grunt-proxy) to bypass SOP on my single page app (hosted on localhost:9000), but when I POST on /resources I keep having rejected request because of SOP, even using the hostRewrite option as follows :
httpProxy.createProxyServer({
...
hostRewrite: 'localhost:9000'
})
Digging into node-http-proxy code I found this test on response code in setRedirectHostRewrite precondition :
var redirectRegex = /^30(1|2|3|7|8)$/;
Why not add 303 to this condition ?
My backend implements a
POSTtohttp://api.domain.com/resourceswith the following response :Status Code : 303 See OtherLocation header : http://api.domain.com/resources/resourceIdI use node-http-proxy (through grunt-proxy) to bypass SOP on my single page app (hosted on localhost:9000), but when I
POSTon/resourcesI keep having rejected request because of SOP, even using the hostRewrite option as follows :Digging into node-http-proxy code I found this test on response code in
setRedirectHostRewriteprecondition :Why not add
303to this condition ?