Skip to content

CORS Headers for other routes #25

@rrcobb

Description

@rrcobb

In response to #6 it looks like the 'Access-Control-Allow-Origin' header was added to the iss-now route but not to other routes.

$ curl -v "http://api.open-notify.org/iss-pass.json?lat=30&lon=30"
*   Trying 138.68.39.196...
* TCP_NODELAY set
* Connected to api.open-notify.org (138.68.39.196) port 80 (#0)
> GET /iss-pass.json?lat=30&lon=30 HTTP/1.1
> Host: api.open-notify.org
> User-Agent: curl/7.54.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Server: nginx/1.10.3
< Date: Thu, 30 Aug 2018 18:51:45 GMT
< Content-Type: application/json
< Content-Length: 517
< Connection: keep-alive
< Via: 1.1 vegur
<
{
  "message": "success",
  "request": {
    "altitude": 100,
    "datetime": 1535654768,
    "latitude": 30.0,
    "longitude": 30.0,
    "passes": 5
  },
  "response": [
    {
      "duration": 366,
      "risetime": 1535673197
    },
    {
      "duration": 639,
      "risetime": 1535678817
    },
    {
      "duration": 499,
      "risetime": 1535684699
    },
    {
      "duration": 468,
      "risetime": 1535702406
    },
    {
      "duration": 636,
      "risetime": 1535708141
    }
  ]
}

The header would be useful for other routes for the same reason mentioned in #6

It looks like #24 has the code to fix this, so maybe all it takes is clicking the merge button!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions