-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
caching: Refactored registration of inline headers in the CacheFilter…
… tree to a separate header file (#12576) Refactored registration of inline headers in the CacheFilter tree to a separate header file. Signed-off-by: Yosry Ahmed <yosryahmed@google.com>
- Loading branch information
Showing
6 changed files
with
72 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
source/extensions/filters/http/cache/inline_headers_handles.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#pragma once | ||
|
||
#include "common/http/headers.h" | ||
|
||
namespace Envoy { | ||
namespace Extensions { | ||
namespace HttpFilters { | ||
namespace Cache { | ||
|
||
inline Http::RegisterCustomInlineHeader<Http::CustomInlineHeaderRegistry::Type::RequestHeaders> | ||
authorization_handle(Http::CustomHeaders::get().Authorization); | ||
|
||
inline Http::RegisterCustomInlineHeader<Http::CustomInlineHeaderRegistry::Type::RequestHeaders> | ||
pragma_handle(Http::CustomHeaders::get().Pragma); | ||
|
||
inline Http::RegisterCustomInlineHeader<Http::CustomInlineHeaderRegistry::Type::RequestHeaders> | ||
request_cache_control_handle(Http::CustomHeaders::get().CacheControl); | ||
|
||
inline Http::RegisterCustomInlineHeader<Http::CustomInlineHeaderRegistry::Type::RequestHeaders> | ||
if_match_handle(Http::CustomHeaders::get().IfMatch); | ||
|
||
inline Http::RegisterCustomInlineHeader<Http::CustomInlineHeaderRegistry::Type::RequestHeaders> | ||
if_none_match_handle(Http::CustomHeaders::get().IfNoneMatch); | ||
|
||
inline Http::RegisterCustomInlineHeader<Http::CustomInlineHeaderRegistry::Type::RequestHeaders> | ||
if_modified_since_handle(Http::CustomHeaders::get().IfModifiedSince); | ||
|
||
inline Http::RegisterCustomInlineHeader<Http::CustomInlineHeaderRegistry::Type::RequestHeaders> | ||
if_unmodified_since_handle(Http::CustomHeaders::get().IfUnmodifiedSince); | ||
|
||
inline Http::RegisterCustomInlineHeader<Http::CustomInlineHeaderRegistry::Type::RequestHeaders> | ||
if_range_handle(Http::CustomHeaders::get().IfRange); | ||
|
||
// Response headers inline handles | ||
inline Http::RegisterCustomInlineHeader<Http::CustomInlineHeaderRegistry::Type::ResponseHeaders> | ||
response_cache_control_handle(Http::CustomHeaders::get().CacheControl); | ||
|
||
inline Http::RegisterCustomInlineHeader<Http::CustomInlineHeaderRegistry::Type::ResponseHeaders> | ||
last_modified_handle(Http::CustomHeaders::get().LastModified); | ||
|
||
inline Http::RegisterCustomInlineHeader<Http::CustomInlineHeaderRegistry::Type::ResponseHeaders> | ||
etag_handle(Http::CustomHeaders::get().Etag); | ||
|
||
} // namespace Cache | ||
} // namespace HttpFilters | ||
} // namespace Extensions | ||
} // namespace Envoy |