GSA / open-gsa-redesign

A fresh start for open.gsa.gov.
https://open.gsa.gov/
Other
56 stars 51 forks source link

Enable CORS for OpenAPI specs files #260

Open Ryandaydev opened 5 years ago

Ryandaydev commented 5 years ago

When a page tries to access the OpenAPI specs from our federalist preview, it gets the following CORS error:

Fetch errorFailed to fetch https://federalist-proxy.app.cloud.gov/preview/gsa/open-gsa-redesign/apidocs-add-swagger-rd-4-2019/api/sample-api/v1/openapi.yaml Fetch errorPossible cross-origin (CORS) issue? The URL origin (https://federalist-proxy.app.cloud.gov) does not match the page (https://petstore.swagger.io). Check the server returns the correct 'Access-Control-Allow-*' headers.

URL to reproduce it: https://petstore.swagger.io/?url=https://federalist-proxy.app.cloud.gov/preview/gsa/open-gsa-redesign/apidocs-add-swagger-rd-4-2019/api/sample-api/v1/openapi.yaml

jfredrickson5 commented 5 years ago

Awaiting changes to Federalist before we can implement this. We need to follow up with the Federalist team in a couple of months.

chinchalinchin commented 9 months ago

lol. looks like someone copied and pasted straight from the swagger docs.

chula3003 commented 2 months ago

When a page tries to access the OpenAPI specs from our federalist preview, it gets the following CORS error:

Fetch errorFailed to fetch https://federalist-proxy.app.cloud.gov/preview/gsa/open-gsa-redesign/apidocs-add-swagger-rd-4-2019/api/sample-api/v1/openapi.yaml Fetch errorPossible cross-origin (CORS) issue? The URL origin (https://federalist-proxy.app.cloud.gov) does not match the page (https://petstore.swagger.io). Check the server returns the correct 'Access-Control-Allow-*' headers.

URL to reproduce it: https://petstore.swagger.io/?url=https://federalist-proxy.app.cloud.gov/preview/gsa/open-gsa-redesign/apidocs-add-swagger-rd-4-2019/api/sample-api/v1/openapi.yaml

chula3003 commented 2 months ago