-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
NIFI-14115 Set Standard HTTP Headers for Framework Responses #9598
Conversation
- Added HeaderWriterHandler implementing Jetty Handler methods for setting standard HTTP response headers - Removed HeaderWriterFilter approach for writing standard HTTP headers - Refactored Jetty Server instantiation to StandardServerProvider for streamlined configuration and testing
Changes look good. Confirmed all headers previously supported are ported over. Verifying build locally then will merge. |
Local build failed.
|
I tried the build on a different system (linux host) and the build was fine. I suspect what I'm hitting is a local system/security configuration issue. Still reviewing |
Thanks for the feedback @joewitt. Although I did not have the local build issue, the error points to a potential timing issue with the Jetty To avoid potential timing issues, I simplified the test method to just check that the server start did not fail. |
With timing addressed and header checks changed the test does now pass. Running full clean build to confirm all the things. Have all three commits |
Summary
NIFI-14115 Adjusts the framework Jetty Server configuration to set standard HTTP headers for all responses, regardless of web application.
The current implementation uses the Spring Security
HeaderWriterFilter
and applies standard Servlet Filters to configured web applications. This covers both framework REST API and custom extensions, but does not include requests to the root web server path.The updated implementation replaces the Servlet Filter approach with a
HeaderWriterHandler
to set the same response headers using a JettyHandler
class. The change introduces a newStandardServerProvider
to decouple JettyServer
instance initialization from lifecycle operations. TheStandardServerProvider
includes decoupled tests for basic operation, including returning expected response headers.Tracking
Please complete the following tracking steps prior to pull request creation.
Issue Tracking
Pull Request Tracking
NIFI-00000
NIFI-00000
Pull Request Formatting
main
branchVerification
Please indicate the verification steps performed prior to pull request creation.
Build
mvn clean install -P contrib-check
Licensing
LICENSE
andNOTICE
filesDocumentation