EasyAdminBundle icon indicating copy to clipboard operation
EasyAdminBundle copied to clipboard

[3.x] Actions URL & HTTPS scheme

Open AntoineLemaire opened this issue 6 years ago • 4 comments

Hi, I'm using EasyAdminBundle 3.1.3 (BTW, I migrated from Sonata, and it's heaven!), and I have an issue concerning the actions urls.

They are generated with absolute urls, but without the HTTPS schema even if my current page is under https://

image

It's the same on the edit actions in the Index page, or in the delete modal like in the screen.

Is there a way to have only relative urls, or to force https scheme?

Thank you

AntoineLemaire avatar Aug 26 '20 20:08 AntoineLemaire

are you behind Reverse proxy like CloudFlare, HAPRoxy or whatever?

Warxcell avatar Aug 27 '20 07:08 Warxcell

@Warxcell No, nothing like that. My website is installed on my own server, with a classic nginx config & a LetsEncrypt Certificate generated by certbot, nothing more

AntoineLemaire avatar Aug 27 '20 07:08 AntoineLemaire

My nginx configuration was the cause, I had fastcgi_param HTTPS off fastcgi_param HTTPS on fixed the issue!

Sorry for disturbing!

AntoineLemaire avatar Aug 28 '20 09:08 AntoineLemaire

Hi @Warxcell , I have a similar issue on AWS Beanstalk, the EasyAdmin link are generated with http, the other project routes from Symfony are generated correctly with https. Do you think the problem might be that the end-to-end encryption is not set up so the load balancer listens from incoming traffic on 443 and talks with the server instances through port 80? Even with the redirect from 80 to 443 there is still some issue, for example when I try to delete a record for example, it redirects to https but then I get redirected to /admin, and the record is not deleted. I think there is also Nginx as proxy.

iulianbeleiu avatar Jan 09 '21 13:01 iulianbeleiu