Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add settings for controlling CORS and changing reverse proxy target #93

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

isakstenstrom
Copy link
Contributor

I found when deploying bb-portal in some situations that the configurability of the application was lacking. The problems I had was that the it was nessecary to proxy the frontend through the backend due to CORS problems, and that the proxying was not configurable.

This PR:

  • Moves the allowedOrigins configuration option from the gRPC-proxies to the root of the configuration, and also uses the setting to allow for CORS on the main HTTP server.
  • Makes the target of the reverse proxy configurable

Note that this brings with it two breaking changes:

  1. The proxy has no default target, so if no target is configured, no proxy will be started. We could easily add back the old target as a default, but I didn't since I think this is a good way to disable the proxy. Let me know if you want to add a default.
  2. I have configured the application to not allow CORS if allowedOrigins is not configured. I think this is better since we this way have secure defaults, but I can change the behavior to the reverse if you think that is better.

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.

1 participant