Adds http_config.response_headers to the UI headers plus tests #7369
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR uses the already existing
http_config.response_headers
user config for setting HTTP headers when serving the UI. Use case here is for setting headers likeX-Frame-Options
for the UI.Fixes #5712
Couple of notes:
serveHandlerWithHandlers
wrapper function is only created if we are running the UI. I'm not sure how important these things are in the codebase, and in the end I hoisted this function out so it lives with the rest of the functions in this file.Submitting in Draft for the moment as I'd like to get some feedback on process for working on the go codebase here before I submit proper.