Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nghttp2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
nghttp2
Commits
e20d2ba9
Commit
e20d2ba9
authored
Sep 25, 2014
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nghttpx: Don't send x-forwarded-proto if -s or -p is used
parent
c1be2868
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
src/shrpx_http2_downstream_connection.cc
src/shrpx_http2_downstream_connection.cc
+2
-1
src/shrpx_http_downstream_connection.cc
src/shrpx_http_downstream_connection.cc
+2
-1
No files found.
src/shrpx_http2_downstream_connection.cc
View file @
e20d2ba9
...
@@ -405,7 +405,8 @@ int Http2DownstreamConnection::push_request_headers()
...
@@ -405,7 +405,8 @@ int Http2DownstreamConnection::push_request_headers()
nva
.
push_back
(
http2
::
make_nv_ls
(
"x-forwarded-for"
,
(
*
xff
).
value
));
nva
.
push_back
(
http2
::
make_nv_ls
(
"x-forwarded-for"
,
(
*
xff
).
value
));
}
}
if
(
downstream_
->
get_request_method
()
!=
"CONNECT"
)
{
if
(
!
get_config
()
->
http2_proxy
&&
!
get_config
()
->
client_proxy
&&
downstream_
->
get_request_method
()
!=
"CONNECT"
)
{
// We use same protocol with :scheme header field
// We use same protocol with :scheme header field
if
(
scheme
.
empty
())
{
if
(
scheme
.
empty
())
{
if
(
client_handler_
->
get_ssl
())
{
if
(
client_handler_
->
get_ssl
())
{
...
...
src/shrpx_http_downstream_connection.cc
View file @
e20d2ba9
...
@@ -221,7 +221,8 @@ int HttpDownstreamConnection::push_request_headers()
...
@@ -221,7 +221,8 @@ int HttpDownstreamConnection::push_request_headers()
http2
::
sanitize_header_value
(
hdrs
,
hdrs
.
size
()
-
(
*
xff
).
value
.
size
());
http2
::
sanitize_header_value
(
hdrs
,
hdrs
.
size
()
-
(
*
xff
).
value
.
size
());
hdrs
+=
"
\r\n
"
;
hdrs
+=
"
\r\n
"
;
}
}
if
(
downstream_
->
get_request_method
()
!=
"CONNECT"
)
{
if
(
!
get_config
()
->
http2_proxy
&&
!
get_config
()
->
client_proxy
&&
downstream_
->
get_request_method
()
!=
"CONNECT"
)
{
hdrs
+=
"X-Forwarded-Proto: "
;
hdrs
+=
"X-Forwarded-Proto: "
;
if
(
!
downstream_
->
get_request_http2_scheme
().
empty
())
{
if
(
!
downstream_
->
get_request_http2_scheme
().
empty
())
{
hdrs
+=
downstream_
->
get_request_http2_scheme
();
hdrs
+=
downstream_
->
get_request_http2_scheme
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment