cncf / landscapeapp

🌄Upstream landscape generation application
https://landscapes.dev/
Apache License 2.0
255 stars 125 forks source link

Has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled. #868

Closed Azzamean closed 1 year ago

Azzamean commented 1 year ago

Hello,

I set up an example site https://omfp.dev-lfprojects3.linuxfoundation.org/for-github-issue/ to review.

We are using front-end to access the landscape and we encounter a CORS issues. There are two URLs we need to use.

  1. https://landscape.openmainframeproject.org/data/items.json - WORKS
  2. https://landscape.openmainframeproject.org/api/items?project=hosted - DOES NOT WORK

I tested a curl to see the difference and see the second one is missing:

access-control-allow-origin: *

Which the first one, which works, has in its response.

I assume this hasn't been an issue before because other systems are not using the client and using the server to access these. But we would like to access via the client. Essentially we just need the header added in so we can use this on Linux Foundation Projects sites. CORS