-
-
Notifications
You must be signed in to change notification settings - Fork 352
test: Add test coverage for header handling in tilejson requests #2529
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
Merged
CommanderStorm
merged 24 commits into
main
from
copilot/add-test-case-x-forwarded-for-header
Feb 10, 2026
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
866aab6
Initial plan
Copilot a14ed2c
Add test case for X-Forwarded-For header in tilejson requests
Copilot 756a2a1
chore: update blessed test snapshots across all components
autofix-ci[bot] 0cf4d6a
Apply suggestion from @CommanderStorm
CommanderStorm df047e2
Delete tests/expected/auto/tilejson_with_x_forwarded_for.json
CommanderStorm 1212a0d
Delete tests/expected/auto/tilejson_with_x_forwarded_for.json.headers
CommanderStorm 1f91681
chore: update blessed test snapshots across all components
autofix-ci[bot] b2a8ab1
Apply suggestion from @CommanderStorm
CommanderStorm bf2f097
Apply suggestions from code review
CommanderStorm bfdc6ba
Apply suggestion from @CommanderStorm
CommanderStorm 0624e8d
Apply suggestion from @CommanderStorm
CommanderStorm 7e6349a
Apply suggestion from @CommanderStorm
CommanderStorm ffe7613
chore: update blessed test snapshots across all components
autofix-ci[bot] e64eced
Apply suggestion from @CommanderStorm
CommanderStorm b7d8094
Apply suggestion from @CommanderStorm
CommanderStorm 5c21346
chore: update blessed test snapshots across all components
autofix-ci[bot] 017d008
fix X-Forwarded-Prefix
CommanderStorm 7c49606
chore: update blessed test snapshots across all components
autofix-ci[bot] a948cdc
Apply suggestion from @CommanderStorm
CommanderStorm cb3268b
Apply suggestions from code review
CommanderStorm d61851d
chore: update blessed test snapshots across all components
autofix-ci[bot] 4dc84a5
Apply suggestion from @CommanderStorm
CommanderStorm cf051eb
chore: update blessed test snapshots across all components
autofix-ci[bot] 934a8a2
Merge branch 'main' into copilot/add-test-case-x-forwarded-for-header
CommanderStorm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,10 @@ | ||
| { | ||
| "foo": { | ||
| "bar": "foo" | ||
| }, | ||
| "name": "function_zxy_query", | ||
| "tilejson": "3.0.0", | ||
| "tiles": [ | ||
| "http://localhost:3111/function_zxy_query/{z}/{x}/{y}" | ||
| ] | ||
| } |
5 changes: 5 additions & 0 deletions
5
tests/expected/auto/tilejson_ignores_x_forwarded_for.json.headers
This file contains hidden or 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,5 @@ | ||
| content-encoding: br | ||
| content-type: application/json | ||
| etag: W/"85-6Q4dOREWZNsdPdT5r-Pjvg==" | ||
| transfer-encoding: chunked | ||
| vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers |
This file contains hidden or 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,10 @@ | ||
| { | ||
| "foo": { | ||
| "bar": "foo" | ||
| }, | ||
| "name": "function_zxy_query", | ||
| "tilejson": "3.0.0", | ||
| "tiles": [ | ||
| "http://localhost/function_zxy_query/{z}/{x}/{y}" | ||
| ] | ||
| } |
5 changes: 5 additions & 0 deletions
5
tests/expected/auto/tilejson_no_forwarded_headers.json.headers
This file contains hidden or 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,5 @@ | ||
| content-encoding: br | ||
| content-type: application/json | ||
| etag: W/"80-ov0SCyAA-3Cf3_JgPvZxvQ==" | ||
| transfer-encoding: chunked | ||
| vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers |
10 changes: 10 additions & 0 deletions
10
tests/expected/auto/tilejson_with_forwarded_host_only.json
This file contains hidden or 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,10 @@ | ||
| { | ||
| "foo": { | ||
| "bar": "foo" | ||
| }, | ||
| "name": "function_zxy_query", | ||
| "tilejson": "3.0.0", | ||
| "tiles": [ | ||
| "http://tiles.example.com/function_zxy_query/{z}/{x}/{y}" | ||
| ] | ||
| } |
5 changes: 5 additions & 0 deletions
5
tests/expected/auto/tilejson_with_forwarded_host_only.json.headers
This file contains hidden or 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,5 @@ | ||
| content-encoding: br | ||
| content-type: application/json | ||
| etag: W/"88-4NeInzTwbUnMoT8DHd6w2w==" | ||
| transfer-encoding: chunked | ||
| vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers |
10 changes: 10 additions & 0 deletions
10
tests/expected/auto/tilejson_with_forwarded_proto_and_host.json
This file contains hidden or 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,10 @@ | ||
| { | ||
| "foo": { | ||
| "bar": "foo" | ||
| }, | ||
| "name": "function_zxy_query", | ||
| "tilejson": "3.0.0", | ||
| "tiles": [ | ||
| "https://tiles.example.com/function_zxy_query/{z}/{x}/{y}" | ||
| ] | ||
| } |
5 changes: 5 additions & 0 deletions
5
tests/expected/auto/tilejson_with_forwarded_proto_and_host.json.headers
This file contains hidden or 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,5 @@ | ||
| content-encoding: br | ||
| content-type: application/json | ||
| etag: W/"89-I2QSzZaYUuhIqVyAcbeV0w==" | ||
| transfer-encoding: chunked | ||
| vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers |
10 changes: 10 additions & 0 deletions
10
tests/expected/auto/tilejson_with_forwarded_proto_only.json
This file contains hidden or 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,10 @@ | ||
| { | ||
| "foo": { | ||
| "bar": "foo" | ||
| }, | ||
| "name": "function_zxy_query", | ||
| "tilejson": "3.0.0", | ||
| "tiles": [ | ||
| "https://localhost:3111/function_zxy_query/{z}/{x}/{y}" | ||
| ] | ||
| } |
5 changes: 5 additions & 0 deletions
5
tests/expected/auto/tilejson_with_forwarded_proto_only.json.headers
This file contains hidden or 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,5 @@ | ||
| content-encoding: br | ||
| content-type: application/json | ||
| etag: W/"86-avawaK9rjztofnjIGTH8tQ==" | ||
| transfer-encoding: chunked | ||
| vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers |
This file contains hidden or 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,10 @@ | ||
| { | ||
| "foo": { | ||
| "bar": "foo" | ||
| }, | ||
| "name": "function_zxy_query", | ||
| "tilejson": "3.0.0", | ||
| "tiles": [ | ||
| "http://example.com/function_zxy_query/{z}/{x}/{y}" | ||
| ] | ||
| } |
This file contains hidden or 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,5 @@ | ||
| content-encoding: br | ||
| content-type: application/json | ||
| etag: W/"82-dXeZmjfhw0vSIzyrLrI2tQ==" | ||
| transfer-encoding: chunked | ||
| vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers |
This file contains hidden or 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,10 @@ | ||
| { | ||
| "foo": { | ||
| "bar": "foo" | ||
| }, | ||
| "name": "function_zxy_query", | ||
| "tilejson": "3.0.0", | ||
| "tiles": [ | ||
| "http://example.com:6000/function_zxy_query/{z}/{x}/{y}" | ||
| ] | ||
| } |
This file contains hidden or 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,5 @@ | ||
| content-encoding: br | ||
| content-type: application/json | ||
| etag: W/"87-SGblGUvNQ8cb-TAcYkikxA==" | ||
| transfer-encoding: chunked | ||
| vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers |
This file contains hidden or 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,10 @@ | ||
| { | ||
| "foo": { | ||
| "bar": "foo" | ||
| }, | ||
| "name": "function_zxy_query", | ||
| "tilejson": "3.0.0", | ||
| "tiles": [ | ||
| "http://tiles.example.com/function_zxy_query/{z}/{x}/{y}" | ||
| ] | ||
| } |
5 changes: 5 additions & 0 deletions
5
tests/expected/auto/tilejson_with_x_forwarded_host.json.headers
This file contains hidden or 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,5 @@ | ||
| content-encoding: br | ||
| content-type: application/json | ||
| etag: W/"88-4NeInzTwbUnMoT8DHd6w2w==" | ||
| transfer-encoding: chunked | ||
| vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers |
This file contains hidden or 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,10 @@ | ||
| { | ||
| "foo": { | ||
| "bar": "foo" | ||
| }, | ||
| "name": "function_zxy_query", | ||
| "tilejson": "3.0.0", | ||
| "tiles": [ | ||
| "http://localhost:3111/tiles/function_zxy_query/{z}/{x}/{y}" | ||
| ] | ||
| } |
5 changes: 5 additions & 0 deletions
5
tests/expected/auto/tilejson_with_x_forwarded_prefix.json.headers
This file contains hidden or 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,5 @@ | ||
| content-encoding: br | ||
| content-type: application/json | ||
| etag: W/"8b-aPZCJuN9gXKyxSjPdCb3Og==" | ||
| transfer-encoding: chunked | ||
| vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers |
10 changes: 10 additions & 0 deletions
10
tests/expected/auto/tilejson_with_x_forwarded_proto_http.json
This file contains hidden or 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,10 @@ | ||
| { | ||
| "foo": { | ||
| "bar": "foo" | ||
| }, | ||
| "name": "function_zxy_query", | ||
| "tilejson": "3.0.0", | ||
| "tiles": [ | ||
| "http://localhost:3111/function_zxy_query/{z}/{x}/{y}" | ||
| ] | ||
| } |
5 changes: 5 additions & 0 deletions
5
tests/expected/auto/tilejson_with_x_forwarded_proto_http.json.headers
This file contains hidden or 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,5 @@ | ||
| content-encoding: br | ||
| content-type: application/json | ||
| etag: W/"85-6Q4dOREWZNsdPdT5r-Pjvg==" | ||
| transfer-encoding: chunked | ||
| vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers |
10 changes: 10 additions & 0 deletions
10
tests/expected/auto/tilejson_with_x_forwarded_proto_https.json
This file contains hidden or 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,10 @@ | ||
| { | ||
| "foo": { | ||
| "bar": "foo" | ||
| }, | ||
| "name": "function_zxy_query", | ||
| "tilejson": "3.0.0", | ||
| "tiles": [ | ||
| "https://localhost:3111/function_zxy_query/{z}/{x}/{y}" | ||
| ] | ||
| } |
5 changes: 5 additions & 0 deletions
5
tests/expected/auto/tilejson_with_x_forwarded_proto_https.json.headers
This file contains hidden or 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,5 @@ | ||
| content-encoding: br | ||
| content-type: application/json | ||
| etag: W/"86-avawaK9rjztofnjIGTH8tQ==" | ||
| transfer-encoding: chunked | ||
| vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers |
This file contains hidden or 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,10 @@ | ||
| { | ||
| "foo": { | ||
| "bar": "foo" | ||
| }, | ||
| "name": "function_zxy_query", | ||
| "tilejson": "3.0.0", | ||
| "tiles": [ | ||
| "http://localhost:3111/footiles/function_zxy_query/{z}/{x}/{y}" | ||
| ] | ||
| } |
This file contains hidden or 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,5 @@ | ||
| content-encoding: br | ||
| content-type: application/json | ||
| etag: W/"8e-cN5TSMZcyidSC58tIB_3kQ==" | ||
| transfer-encoding: chunked | ||
| vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers |
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.