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

fix: disable csp headers in non-release mode for ui dev #1304

Merged
merged 3 commits into from
Jan 30, 2023

Conversation

markphelps
Copy link
Collaborator

Fixes: FLI-191

Don't set CSP header when running in development mode (version == "dev")

In the future I'd like to switch to some kind of 'mode' based logic, where we can more easily tell if Flipt is running locally for our development vs running in 'release' mode

@markphelps markphelps requested a review from a team as a code owner January 30, 2023 15:18
Copy link
Contributor

@GeorgeMac GeorgeMac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

I think I see that because of the embedded Vite page serving at the entrypoint we have the same devtools problem.
We would have to run vite from the UI repo and not embed the vite page to get the experience I had imagined. Where we could leave these CSP headers untouched.

@markphelps markphelps merged commit cecd7bc into main Jan 30, 2023
@markphelps markphelps deleted the fix-dev-ui-csp branch January 30, 2023 16:59
markphelps added a commit that referenced this pull request Jan 30, 2023
* main:
  fix: disable csp headers in non-release mode for ui dev (#1304)
markphelps added a commit that referenced this pull request Jan 31, 2023
* main:
  chore: bump prom verison (#1305)
  Otel improvements (#1306)
  fix: disable csp headers in non-release mode for ui dev (#1304)
  chore(deps): bump go.opentelemetry.io/otel/exporters/jaeger (#1299)
  chore(deps): bump google.golang.org/grpc from 1.52.0 to 1.52.3 (#1303)
  feat(logging): support custom time, level and message keys (#1295)
  fix: get linter running correctly locally (#1296)
  chore(deps): bump go.opentelemetry.io/otel from 1.11.2 to 1.12.0 (#1301)
  chore(deps): bump golangci/golangci-lint-action from 3.3.1 to 3.4.0 (#1298)
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.

2 participants