@@ -54,6 +54,11 @@ describe('Auth Proxy', () => {
5454 expect ( headers ) . to . have . property ( 'host' , 'server-a.org' )
5555 } )
5656
57+ it ( 'sets the Forwarded header on the proxy request' , ( ) => {
58+ const { headers } = response . body
59+ expect ( headers ) . to . have . property ( 'forwarded' , `host=${ HOST } ` )
60+ } )
61+
5762 it ( 'returns status code 200' , ( ) => {
5863 expect ( response ) . to . have . property ( 'statusCode' , 200 )
5964 } )
@@ -83,6 +88,11 @@ describe('Auth Proxy', () => {
8388 expect ( headers ) . to . have . property ( 'host' , 'server-a.org' )
8489 } )
8590
91+ it ( 'sets the Forwarded header on the proxy request' , ( ) => {
92+ const { headers } = response . body
93+ expect ( headers ) . to . have . property ( 'forwarded' , `host=${ HOST } ` )
94+ } )
95+
8696 it ( 'returns status code 200' , ( ) => {
8797 expect ( response ) . to . have . property ( 'statusCode' , 200 )
8898 } )
@@ -112,6 +122,11 @@ describe('Auth Proxy', () => {
112122 expect ( headers ) . to . have . property ( 'host' , 'server-b.org' )
113123 } )
114124
125+ it ( 'sets the Forwarded header on the proxy request' , ( ) => {
126+ const { headers } = response . body
127+ expect ( headers ) . to . have . property ( 'forwarded' , `host=${ HOST } ` )
128+ } )
129+
115130 it ( 'returns status code 200' , ( ) => {
116131 expect ( response ) . to . have . property ( 'statusCode' , 200 )
117132 } )
@@ -141,6 +156,11 @@ describe('Auth Proxy', () => {
141156 expect ( headers ) . to . have . property ( 'host' , 'server-b.org' )
142157 } )
143158
159+ it ( 'sets the Forwarded header on the proxy request' , ( ) => {
160+ const { headers } = response . body
161+ expect ( headers ) . to . have . property ( 'forwarded' , `host=${ HOST } ` )
162+ } )
163+
144164 it ( 'returns status code 200' , ( ) => {
145165 expect ( response ) . to . have . property ( 'statusCode' , 200 )
146166 } )
@@ -174,6 +194,11 @@ describe('Auth Proxy', () => {
174194 expect ( headers ) . to . have . property ( 'host' , 'server-a.org' )
175195 } )
176196
197+ it ( 'sets the Forwarded header on the proxy request' , ( ) => {
198+ const { headers } = response . body
199+ expect ( headers ) . to . have . property ( 'forwarded' , `host=${ HOST } ` )
200+ } )
201+
177202 it ( 'returns status code 200' , ( ) => {
178203 expect ( response ) . to . have . property ( 'statusCode' , 200 )
179204 } )
0 commit comments