Skip to content

Conversation

@JuroUhlar
Copy link
Contributor

  • Proxy integration should send the other Fpjs-proxy-* headers even if the proxy secret is undefined. This allows the Fingerprint API to recognize the request as proxied and apply appropriate validation.
  • Adjusted tests, making small improvements along the way:
    • Tests now check if pre-existing headers are preserved.
    • Tests now check if the value of the proxy secret header matches.
    • The "correct configuration" test case comes first.
    • "No proxy secret" test makes sure the secret is not defined in the Secret store. Previous code relied on the order of test cases to work.

@github-actions
Copy link

This PR will create a patch release 🚀

0.3.1 (2025-03-19)

Bug Fixes

  • send other proxy headers even if proxy secret is undefined (5597be5)

@JuroUhlar JuroUhlar changed the title fix: send other proxy headers even if proxy secret is undefined fix: send other proxy headers even if proxy secret is undefined INTER-1158 Mar 19, 2025
@github-actions
Copy link

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements 74.26% 251/338
🟡 Branches 67.92% 72/106
🟡 Functions 79.73% 59/74
🟡 Lines 74.77% 249/333

Test suite run success

72 tests passing in 7 suites.

Report generated by 🧪jest coverage report action from 5597be5

Show full coverage report
St File % Stmts % Branch % Funcs % Lines Uncovered Line #s
🟡 All files 74.26 67.92 79.72 74.77
🟢  src 89.85 100 85.71 91.17
🟢   env.ts 90.24 100 85.71 90.24 74,81,93,100
🟢   handler.ts 100 100 100 100
🟡   index.ts 66.66 100 50 75 17-18
🟡  src/handlers 72.48 48.27 76.19 72.29
🟢   handleDownloadScript.ts 100 100 100 100
🟡   handleIngressAPI.ts 68.29 50 66.66 67.5 16,34-59
🟡   handleStatusPage.ts 71.13 47.61 76.92 71.13 66,83,94-119,136-138,146-152,233-235
🔴   index.ts 0 0 0 0
🟡  src/utils 67.5 85.71 78.12 68.37
🟢   addProxyIntegrationHeaders.ts 100 100 100 100
🟢   addTrafficMonitoring.ts 100 100 100 100
🔴   base64.ts 0 100 0 0 2-9
🟢   clientIp.ts 100 100 100 100
🔴   cloneFastlyResponse.ts 0 100 0 0 2
🟢   cookie.ts 100 100 100 100
🟢   createErrorResponse.ts 100 100 100 100
🟢   createRoute.ts 100 100 100 100
🔴   decrypt.ts 12.5 100 0 12.5 8-16
🟢   getIngressBackendByRegion.ts 100 100 100 100
🟢   getStore.ts 83.33 100 75 83.33 30-31
🔴   index.ts 0 0 0 0
🔴   processOpenClientResponse.ts 0 0 0 0 15-39
🟢   proxyEndpoint.ts 100 100 100 100
🟢   registerPlugin.ts 100 100 100 100
🟢   returnHttpResponse.ts 100 100 100 100
🔴   unsealData.ts 0 100 0 0 6-10

@JuroUhlar JuroUhlar merged commit dccc2cd into main Mar 20, 2025
8 checks passed
@JuroUhlar JuroUhlar deleted the fix/always-send-all-proxy-headers branch March 20, 2025 14:10
@fingerprint-dx-team
Copy link
Contributor

🎉 This PR is included in version 0.3.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants