webcompat / webcompat-metrics-server

Server in charge of delivering different data to the webcompat-metrics-client
Mozilla Public License 2.0
6 stars 5 forks source link

Adds CORS headers for developement #31

Closed magsout closed 6 years ago

magsout commented 6 years ago

@karlcow it ok on production but on developement not.

capture d ecran 2018-06-21 a 21 40 47

karlcow commented 6 years ago

@magsout This should be working now

magsout commented 6 years ago

@karlcow still same message and error capture d ecran 2018-06-21 a 22 07 55 capture d ecran 2018-06-21 a 22 08 04

karlcow commented 6 years ago

hmm weird

→ http HEAD https://webcompat-metrics-staging.herokuapp.com/data/needsdiagnosis-timeline

Or is it when you test locally? aka not hosted.

HTTP/1.1 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: https://webcompat.github.io
Connection: keep-alive
Content-Length: 108434
Content-Type: application/json
Date: Thu, 21 Jun 2018 20:10:30 GMT
Server: gunicorn/19.8.1
Vary: Origin
Via: 1.1 vegur

Access-Control-Allow-Origin: https://webcompat.github.io this tells to accept only from webcompat.github.io.

magsout commented 6 years ago

@karlcow

Or is it when you test locally? aka not hosted.

Yes, exactly :(

magsout commented 6 years ago

http://localhost:3001/?from=2018-05-21&to=2018-06-21

karlcow commented 6 years ago

so indeed there are two ways to solve this:

Let me add *

karlcow commented 6 years ago

Pull request in the pipe #32