Skip to content

Conversation

plakyda-codefresh
Copy link
Member

What

This PR updates the internal-router ConfigMap to add CORS headers in the NGINX error handler for /app-proxy.

Why

To allow frontend clients (local.codefresh.io) to receive valid CORS responses even when the backend service is down (502). This avoids CORS-related failures on network errors during preflight or API calls.

Notes

  • CORS headers are only applied on error responses via the @app_proxy_init_error location block.
  • Regular (successful) responses remain untouched.
  • Preflight OPTIONS requests now return a 204 with appropriate CORS headers.

@plakyda-codefresh plakyda-codefresh requested a review from a team as a code owner May 16, 2025 10:49
@mikhail-klimko mikhail-klimko requested a review from a team as a code owner May 19, 2025 07:39
@plakyda-codefresh
Copy link
Member Author

/e2e

1 similar comment
@plakyda-codefresh
Copy link
Member Author

/e2e

@plakyda-codefresh
Copy link
Member Author

/e2e

@plakyda-codefresh plakyda-codefresh merged commit ee22e72 into main May 22, 2025
3 checks passed
@plakyda-codefresh plakyda-codefresh deleted the feat/app-proxy-ui-retry-mechanism-cors branch May 22, 2025 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants