Skip to content
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

fix: gateway requested with custom header requested from #1344

Merged

Conversation

vasco-santos
Copy link
Contributor

@vasco-santos vasco-santos commented Feb 11, 2022

Using request headers host as value for the header per

image

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Feb 11, 2022

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: f5eddbf
Status: ✅  Deploy successful!
Preview URL: https://f0107709.nft-storage-1at.pages.dev

View logs

@@ -236,6 +236,7 @@ function getHeaders(request) {
'X-Forwarded-For': `${request.headers.get(
'cf-connecting-ip'
)}${existingProxies}`,
'X-Requested-From': 'nft.storage',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we should use X-Forwarded-Host? WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, good call! I tried to find something like it, but my google early skills were not good 😅

Copy link
Contributor

@alanshaw alanshaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TY

@vasco-santos vasco-santos merged commit cf841bb into main Feb 11, 2022
@vasco-santos vasco-santos deleted the fix/gateway-request-with-custom-header-requested-from branch February 11, 2022 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants