padde / mr-spaceapi

Implementation of the SpaceAPI for Maschinenraum
1 stars 0 forks source link

Set proper HTTP headers #5

Closed padde closed 10 years ago

padde commented 10 years ago

Validator sez:

The 'Access-Control-Allow-Origin' header (with a preferred value of '*') is not set!
The 'Cache-Control' header (with a preferred value of 'no-cache') is not set!

He's right...

$ curl -I api.maschinenraum.tk/status.json
HTTP/1.1 200 OK
Content-length: 1009
Content-Type: application/json;charset=utf-8
Server: thin 1.5.1 codename Straight Razor
X-Content-Type-Options: nosniff
Connection: keep-alive
padde commented 10 years ago

Validator is dumb, probably does not send proper headers for validating CORS. I have hard coded

Access-Control-Allow-Origin: *

to make him happy ;-)