Check X-Forwarded-Proto when behind a proxy to see what the protocol is #1015

wants to merge 2 commits into

2 participants


Hey, here is a tiny change to support check X-Forwarded-Proto when behind a proxy

Both and suggest this is the correct header to check but the code wasn't checking it

@yanick yanick added a commit that closed this pull request Apr 15, 2014
@yanick yanick Merge branch 'pr/1015' into devel
Fixes #1015
@yanick yanick closed this in b6821f4 Apr 15, 2014

Looks good. Thanks!

@yanick yanick reopened this Apr 15, 2014

See PerlDancer/Dancer2#566 - the code part can be removed

Andy Jones Remove duplicate check for X-Forwarded-Proto header. PSGI prefixes al…
…l HTTP headers with HTTP_ so it is already being checked

Sorry Yanick, you are absolutely right. I've removed the code

I can use Test::TCP like the referenced Dancer2 tests if that helps? Sorry about that


@andyjones No problem. :-)

I've ended up leaving the value, but with a note. Under PSGI, we'll never need that failsafe, but as Dancer::Test doesn't use PSGI (yet), and because Test::TCP can be problematic (there are some cases where there are test failing because of port clashes), leaving that bit in the code is the simplest approach for now.

@yanick yanick closed this Apr 19, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment