Closed Edw125 closed 1 year ago
Piccolo Admin serves its own static files, so you shouldn't have to worry about that.
create_admin
has an argument called allowed_hosts
which adds extra security when running under HTTPS:
https://piccolo-admin.readthedocs.io/en/latest/asgi/index.html#source
Try setting that to ['telegram-access.ddns.net']
.
create_admin(..., allowed_hosts=['telegram-access.ddns.net'])
I already tried that but I think the problem in nginx
Hmm, it looks ok. Maybe try a trailing slash on location /admin
, so it's location /admin/
This is work solution. Thanks! )
Hello. I want to build service that includes piccolo admin. Basically everything is great, but I installed the certificates SSL on my dev server and I ran into a problem. I have the following components: nginx, fastapi, piccolo orm and admin. When I try to open the site in dev mode with using ssl I get page without static like this in logs I see what subrequests are sent with 404 code I understood that static files such as html css js are located in folder venv/lib/...., but in docker I didn't find it. Maybe need configure in any way nginx to serve static?
How to solve this? Thanks for answers