Mailing List Archive

$c->uri_for and $c->uri_for_action ignoring https
Hi everyone

In my infinite(!) wisdom, I decided to do a complete server rebuild before
people will start using my website again next month. This previously was
working correctly, however now even though the page is being served over
https, all the links (which use $c->uri_for and $c->uri_for_action) are
returning http versions, which is causing the style sheets to fail to load
for one thing, but also form submissions are going over http.

Some things that may be pertinent:


- Using nginx / Starman (same as before).
- This is using a letsencrypt certificate, which it was before, but when
I set it up before there wasn't a certbot to automate it, so it was done
manually.
- Website in case it's useful: https://www.mkttl.co.uk/
- Catalyst version is now the latest - previously I *think* it
was 5.90118, but unfortunately can't be sure.

Thank you in advance for any suggestions!


Chris
Re: $c->uri_for and $c->uri_for_action ignoring https [ In reply to ]
My first thought is...

https://metacpan.org/pod/Catalyst#PROXY-SUPPORT


On 02/10/2021 14:35, Chris Welch wrote:
> Hi everyone
>
> In my infinite(!) wisdom, I decided to do a complete server rebuild
> before people will start using my website again next month. This
> previously was working correctly, however now even though the page is
> being served over https, all the links (which use $c->uri_for and
> $c->uri_for_action) are returning http versions, which is causing the
> style sheets to fail to load for one thing, but also form submissions
> are going over http.
>
> Some things that may be pertinent:
>
> * Using nginx / Starman (same as before).
> * This is using a letsencrypt certificate, which it was before, but
> when I set it up before there wasn't a certbot to automate it, so
> it was done manually.
> * Website in case it's useful: https://www.mkttl.co.uk/
> <https://www.mkttl.co.uk/>
> * Catalyst version is now the latest - previously I *think* it
> was 5.90118, but unfortunately can't be sure.
>
> Thank you in advance for any suggestions!
>
>
> Chris
>
> _______________________________________________
> List: Catalyst@lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
Re: $c->uri_for and $c->uri_for_action ignoring https [ In reply to ]
Apologies, I have sorted this - I must have forgotten that I had set
the using_frontend_proxy option and then set the X-Forwarded-Port header on
nginx before.

On Sat, 2 Oct 2021 at 14:35, Chris Welch <welch.chris@gmail.com> wrote:

> Hi everyone
>
> In my infinite(!) wisdom, I decided to do a complete server rebuild before
> people will start using my website again next month. This previously was
> working correctly, however now even though the page is being served over
> https, all the links (which use $c->uri_for and $c->uri_for_action) are
> returning http versions, which is causing the style sheets to fail to load
> for one thing, but also form submissions are going over http.
>
> Some things that may be pertinent:
>
>
> - Using nginx / Starman (same as before).
> - This is using a letsencrypt certificate, which it was before, but
> when I set it up before there wasn't a certbot to automate it, so it was
> done manually.
> - Website in case it's useful: https://www.mkttl.co.uk/
> - Catalyst version is now the latest - previously I *think* it
> was 5.90118, but unfortunately can't be sure.
>
> Thank you in advance for any suggestions!
>
>
> Chris
>