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

Admin panel does not load correctly behind reverse proxy #34

Closed
alexdelprete opened this issue Sep 28, 2022 · 4 comments · Fixed by #51
Closed

Admin panel does not load correctly behind reverse proxy #34

alexdelprete opened this issue Sep 28, 2022 · 4 comments · Fixed by #51
Assignees
Labels
🐛 bug Something isn't working

Comments

@alexdelprete
Copy link
Contributor

I have a "mixed content" issue loading the admin panel, it doesn't load the CSS. I use Traefik, with an https url, and it's pulling the site from the internal docker http url.

image

This is what I see in the log (see http error 302):

10.1.10.30 - - [28/Sep/2022:17:55:07 +0200] "GET / HTTP/1.1" 302 394 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 Edg/107.0.0.0"
10.1.10.30 - - [28/Sep/2022:17:55:07 +0200] "GET /admin HTTP/1.1" 302 418 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 Edg/107.0.0.0"
10.1.10.30 - - [28/Sep/2022:17:55:07 +0200] "GET /admin/login HTTP/1.1" 200 3639 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 Edg/107.0.0.0"
10.1.10.30 - - [28/Sep/2022:17:55:22 +0200] "POST /livewire/message/filament.core.auth.login HTTP/1.1" 200 264 "https://speedtest.osilife.net/admin/login" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)Chrome/107.0.0.0 Safari/537.36 Edg/107.0.0.0"
10.1.10.30 - - [28/Sep/2022:17:55:23 +0200] "GET /admin HTTP/1.1" 200 13616 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 Edg/107.0.0.0"

If I use the docker url directly it works fine.

image

This is the log whith the direct url, bypassing the proxy:

10.1.10.45 - - [28/Sep/2022:17:42:31 +0200] "POST /livewire/message/filament.core.auth.login HTTP/1.1" 200 257 "http://docker2.axel.dom:8008/admin/login" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 Edg/107.0.0.0"
10.1.10.45 - - [28/Sep/2022:17:42:31 +0200] "GET /admin HTTP/1.1" 200 13623 "http://docker2.axel.dom:8008/admin/login" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 Edg/107.0.0.0"
10.1.10.45 - - [28/Sep/2022:17:42:38 +0200] "GET /admin HTTP/1.1" 200 13620 "http://docker2.axel.dom:8008/admin" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 Edg/107.0.0.0"
10.1.10.45 - - [28/Sep/2022:17:42:45 +0200] "GET /admin/results HTTP/1.1" 200 19249 "http://docker2.axel.dom:8008/admin" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 Edg/107.0.0.0"

I already had this issue with BookStack, that is built with PHP: BookStackApp/BookStack#1204

The guys at LinuxServer.io built the BookStack image with an APP_URL env variable to solve the issue with reverse proxies. I guess it configures the BASE_URL for php, something like that.

image

@alexjustesen
Copy link
Owner

I'm going to be making a significant change to how the app handles environment variables / config options... more to come on that.

@Dima-Kal
Copy link

Dima-Kal commented Oct 9, 2022

Hey i'm facing same issue, any update on this?

@alexjustesen
Copy link
Owner

@alexdelprete @Dima-Kal latest code in main branch (not tagged yet) has support for auto-generating an SSL cert within the container. This means it will only be available on 443 (or a port mapped to 443). How do you guys feel about that change?

@alexdelprete
Copy link
Contributor Author

support for auto-generating an SSL cert within the container. This means it will only be available on 443 (or a port mapped to 443). How do you guys feel about that change?

Could be a proper workaround, basically we're forcing SSL. But I was wondering about what the guys at LinuxServer.io did to solve the same issue for BookStack, I wrote about it in my previous post, don't know if you noticed it:

The guys at LinuxServer.io built the BookStack image with an APP_URL env variable to solve the issue with reverse proxies. I guess it configures the BASE_URL for php, something like that.

@alexjustesen alexjustesen added the 🐛 bug Something isn't working label Oct 21, 2022
@alexjustesen alexjustesen self-assigned this Oct 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants