-
Notifications
You must be signed in to change notification settings - Fork 5.3k
http: add headers via local reply mapper #12093
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
Changes from all commits
7865750
c8f5cc0
84d28b0
c22c8fa
ff8a9ec
5b98901
19a26e0
e9249b3
8b0afd0
a121272
0197c5f
53370b3
5841230
381d30d
5286f9c
15c1b82
60c814a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -605,6 +605,7 @@ message LocalReplyConfig { | |
| } | ||
|
|
||
| // The configuration to filter and change local response. | ||
| // [#next-free-field: 6] | ||
| message ResponseMapper { | ||
| // Filter to determine if this mapper should apply. | ||
| config.accesslog.v3.AccessLogFilter filter = 1 [(validate.rules).message = {required: true}]; | ||
|
|
@@ -619,6 +620,11 @@ message ResponseMapper { | |
| // A per mapper `body_format` to override the :ref:`body_format <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.LocalReplyConfig.body_format>`. | ||
| // It will be used when this mapper is matched. | ||
| config.core.v3.SubstitutionFormatString body_format_override = 4; | ||
|
|
||
| // HTTP headers to add to a local reply. This allows the response mapper to append, to add | ||
| // or to override headers of any local reply before it is sent to a downstream client. | ||
| repeated config.core.v3.HeaderValueOption headers_to_add = 5 | ||
| [(validate.rules).repeated = {max_items: 1000}]; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would probably remove this. The limit seems somewhat arbitrary.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We have these limits in other places for heads to add. I think it was put in for fuzzing.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see, OK. Sounds good.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, this is why I added this requirement - I checked other places where the list of headers was defined and basically all of them had this limitation. |
||
| } | ||
|
|
||
| message Rds { | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.