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

Added x-forwarded-host as precedence over host header #1999

Merged

Conversation

janario
Copy link
Contributor

@janario janario commented Nov 1, 2021

As started to support at #1641

This PR added the precedence for x-forwarded-host when running behind a reverse proxy.

@janario janario changed the title WIP: Added x-forwarded-host as precedence over host header Added x-forwarded-host as precedence over host header Nov 3, 2021
@janario
Copy link
Contributor Author

janario commented Nov 3, 2021

Ready for review ;-)

@slsnextbot
Copy link
Collaborator

slsnextbot commented Nov 3, 2021

Handler Size Report

There are changes to handler sizes. Please review.

Base Handler Sizes (kB) (commit af344fd)

{
    "Lambda": {
        "Default Lambda": {
            "Standard": 1519,
            "Minified": 666
        },
        "Image Lambda": {
            "Standard": 1485,
            "Minified": 801
        }
    },
    "Lambda@Edge": {
        "Default Lambda": {
            "Standard": 1529,
            "Minified": 672
        },
        "Default Lambda V2": {
            "Standard": 1521,
            "Minified": 668
        },
        "API Lambda": {
            "Standard": 632,
            "Minified": 318
        },
        "Image Lambda": {
            "Standard": 1493,
            "Minified": 805
        },
        "Regeneration Lambda": {
            "Standard": 1183,
            "Minified": 544
        },
        "Regeneration Lambda V2": {
            "Standard": 1251,
            "Minified": 571
        }
    }
}

New Handler Sizes (kB) (commit d9340ae)

{
    "Lambda": {
        "Default Lambda": {
            "Standard": 1520,
            "Minified": 666
        },
        "Image Lambda": {
            "Standard": 1485,
            "Minified": 801
        }
    },
    "Lambda@Edge": {
        "Default Lambda": {
            "Standard": 1530,
            "Minified": 672
        },
        "Default Lambda V2": {
            "Standard": 1522,
            "Minified": 669
        },
        "API Lambda": {
            "Standard": 633,
            "Minified": 318
        },
        "Image Lambda": {
            "Standard": 1493,
            "Minified": 805
        },
        "Regeneration Lambda": {
            "Standard": 1183,
            "Minified": 544
        },
        "Regeneration Lambda V2": {
            "Standard": 1251,
            "Minified": 571
        }
    }
}

@codecov
Copy link

codecov bot commented Nov 3, 2021

Codecov Report

Merging #1999 (d9340ae) into master (af344fd) will increase coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1999      +/-   ##
==========================================
+ Coverage   83.79%   83.83%   +0.04%     
==========================================
  Files         102      102              
  Lines        3628     3638      +10     
  Branches     1138     1141       +3     
==========================================
+ Hits         3040     3050      +10     
  Misses        577      577              
  Partials       11       11              
Impacted Files Coverage Δ
packages/libs/core/src/route/locale.ts 99.15% <100.00%> (+0.07%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update af344fd...d9340ae. Read the comment docs.

@dphang
Copy link
Collaborator

dphang commented Nov 4, 2021

Hm, this looks fine but seems to have broken the e2e tests: https://github.com/serverless-nextjs/serverless-next.js/runs/4101421933?check_suite_focus=true. Haven't had a chance to investigate but if you could try to deploy to the next-app app and test to see what broke, that would be great

@mathvbarone
Copy link
Contributor

mathvbarone commented Nov 8, 2021

Hm, this looks fine but seems to have broken the e2e tests: https://github.com/serverless-nextjs/serverless-next.js/runs/4101421933?check_suite_focus=true. Haven't had a chance to investigate but if you could try to deploy to the next-app app and test to see what broke, that would be great

Hey @dphang I am trying to figure out what is going on with the e2e tests...
I deployed this version of serverless-nextjs to a nextjs and I was not able to reproduce the issue, could you please point out what could be wrong, or what steps to reproduce the error?
Thanks!

@mathvbarone
Copy link
Contributor

mathvbarone commented Nov 8, 2021

Hm, this looks fine but seems to have broken the e2e tests: https://github.com/serverless-nextjs/serverless-next.js/runs/4101421933?check_suite_focus=true. Haven't had a chance to investigate but if you could try to deploy to the next-app app and test to see what broke, that would be great

Hey @dphang I am trying to figure out what is going on with the e2e tests... I deployed this version of serverless-nextjs to a nextjs and I was not able to reproduce the issue, could you please point out what could be wrong, or what steps to reproduce the error? Thanks!

Ok, I managed to run it (by following instructions on CONTRIBUTING.md 😅)) and still not sure what is the issue...I rolled back the changes to current master, ran the e2e tests again, and got the same result as with the changes:

image

:/

@dphang
Copy link
Collaborator

dphang commented Nov 8, 2021

@mathvbarone thanks for taking a look. I will try to take a look myself (probably need to look into the actual lambda logs for the e2e tests to see what's going on)

@janario
Copy link
Contributor Author

janario commented Nov 13, 2021

Hi

I've pulled the remote main branch again.

Anything pending on us in the PR?

Thanks,
Janario Oliveira

@dphang
Copy link
Collaborator

dphang commented Nov 13, 2021

Hm seems the previous issue with E2E tests was transient, it succeeded now. Will merge and publish later after master is green

@dphang dphang merged commit 8258122 into serverless-nextjs:master Nov 14, 2021
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.

4 participants