p-meier / hapi-api-version

An API versioning plugin for hapi.
Apache License 2.0
74 stars 26 forks source link

CORS is not working when default version fires for POST request #15

Closed calebbriancescoGL closed 7 years ago

calebbriancescoGL commented 7 years ago

I have set the path "/v1/images/thumbnails" but it wont work if I send the post request to "/images/thumbnails", first I get a 404 over the method and then I get the following error:

XMLHttpRequest cannot load http://api.photoandgo.local/images/thumbnail. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://bocaraton.local.photoandgo.com:5002' is therefore not allowed access. The response had HTTP status code 404.
p-meier commented 7 years ago

Please check if #17 fixes your issue. I am building a new version today...

timcosta commented 7 years ago

Closing this issue as fixed due to lack of response. I was experiencing the same issue on 1.3.0 and can confirm that it was fixed in 1.4.0.