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

Amplify is not passing headers on custom domains #2173

Closed
4 tasks done
uspai opened this issue Aug 17, 2021 · 6 comments
Closed
4 tasks done

Amplify is not passing headers on custom domains #2173

uspai opened this issue Aug 17, 2021 · 6 comments
Labels
archived This issue has been locked. bug Something isn't working custom-headers pending-prioritization Added to the backlog. Pending prioritization.

Comments

@uspai
Copy link

uspai commented Aug 17, 2021

Before opening, please confirm:

App Id

demy2iltb613o

Region

us-east-2

Amplify Console feature

Custom headers

Describe the bug

Hi,
I have a reverse proxy from /api/<> to https://prod.linvo.io/<>
For some reason, it's not passing my custom headers.
I have 3 custom domains registered:
beta.linvo.io
dashboard.linvo.io
managers.linvo.io

Trying to access https://*.linvo.io/api/managers/self

Now here is the funny thing,
If I am using the provided domain, it works!
https://master.demy2iltb613o.amplifyapp.com/api/managers/self

The reverse proxy worked for the last 2 months.
This morning I woke up and it's failing.
This is a production version and honestly, I am not sure what to do.

Expected behavior

Proxy pass works like before without failing.

Reproduction steps

Register here:
https://managers.linvo.io/register

Login, and you will see the error.
https://managers.linvo.io/login

You can copy the request, change the domain to
https://master.demy2iltb613o.amplifyapp.com

And it will work.

Build Settings

version: 1
frontend:
  phases:
    preBuild:
      commands:
        - npm install
    build:
      commands:
        - npm run managers
  artifacts:
    baseDirectory: build
    files:
      - '**/*'
  cache:
    paths:
      - node_modules/**/*

Additional information

It was working for the last 2 months!

@github-actions
Copy link

Hi 👋, thanks for opening! While we look into this...

If this issue is related to custom domains, be sure to check the custom domains troubleshooting guide to see if that helps. Also, there is a more general troubleshooting FAQ that may be helpful for other questions.

Lastly, please make sure you've specified the App ID and Region in the issue!

@behrooziAWS
Copy link
Contributor

It looks like you've made some changes since when you cut this issue. Namely, you are no longer hosting the custom domain on amplify and instead you own the distribution and are setting the amplify app as the origin. Are you still having issues? What were the header names that stopped being sent to the reverse proxy?

@uspai
Copy link
Author

uspai commented Aug 28, 2021

Hi behrooziAWS, it was a production version I had to do changes.
I am using now CloudFront, with some URL rewriting (it's not a good solution).
Did you see anything in your side?

@ghost ghost added bug Something isn't working s2 labels Jan 27, 2023
@ghost ghost removed the s2 label Mar 17, 2023
@ghost ghost added pending-prioritization Added to the backlog. Pending prioritization. custom-headers and removed hosting labels May 31, 2023
@ghost ghost mentioned this issue May 31, 2023
3 tasks
@calavera
Copy link
Contributor

Custom headers are added to responses for custom domains as expected already. Closing this issue since it has been resolved.

Copy link

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

Copy link

This issue has been automatically locked.

@github-actions github-actions bot added the archived This issue has been locked. label Feb 22, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Feb 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived This issue has been locked. bug Something isn't working custom-headers pending-prioritization Added to the backlog. Pending prioritization.
Projects
None yet
Development

No branches or pull requests

4 participants