orijtech / media-search

Media search's code
Apache License 2.0
15 stars 1 forks source link

server: cors-middleware #9

Closed odeke-em closed 6 years ago

odeke-em commented 6 years ago

Fixes #7

Now sends back CORS headers for responses.

404 page not found


* After
```shell
$ curl -i http://localhost:9778/foo
HTTP/1.1 404 Not Found
Access-Control-Allow-Headers: *
Access-Control-Allow-Methods: *
Access-Control-Allow-Origin: *
Content-Type: text/plain; charset=utf-8
X-Content-Type-Options: nosniff
Date: Thu, 12 Apr 2018 23:30:43 GMT
Content-Length: 19

404 page not found
odeke-em commented 6 years ago

/cc @hvent90