Fixes images not loading in docker dev setup

environments/review-docs-renov-4e893d/deployments/11092
Marcos Peña 2022-04-06 17:32:55 +02:00 zatwierdzone przez Marcos Peña
rodzic 68ff51c26d
commit 8bc273ab76
3 zmienionych plików z 6 dodań i 2 usunięć

Wyświetl plik

@ -12,7 +12,6 @@ FORWARDED_PROTO=http
LDAP_ENABLED=False
FUNKWHALE_SPA_HTML_ROOT=http://nginx/front/
PYTHONTRACEMALLOC=0
STATIC_URL=http://localhost:8000/staticfiles/
# Uncomment this if you're using traefik/https
# FORCE_HTTPS_URLS=True

Wyświetl plik

@ -132,6 +132,11 @@ Create it like this::
touch .env
These two environment variables must be included for the images to load in front-end and django admin pages::
MEDIA_URL=http://localhost:8000/media/
STATIC_URL=http://localhost:8000/staticfiles/
Create docker network
^^^^^^^^^^^^^^^^^^^^^

Wyświetl plik

@ -69,7 +69,7 @@ http {
text/x-component
text/x-cross-domain-policy;
add_header Content-Security-Policy "default-src 'self' 'unsafe-eval'; connect-src 'self' 'unsafe-eval' *; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:; object-src 'none'; media-src 'self' data:";
add_header Content-Security-Policy "default-src 'self' 'unsafe-eval'; connect-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:; object-src 'none'; media-src 'self' data:";
add_header Referrer-Policy "strict-origin-when-cross-origin";
add_header X-Frame-Options "SAMEORIGIN" always;