Ver a proveniência

Fix preflight CORS redirect issue

pull/544/head
Guillaume Vincent há 4 anos
ascendente
cometimento
ee30d0528c
3 ficheiros alterados com 7 adições e 9 eliminações
  1. +2
    -0
      containers/backend/lesspass/settings.py
  2. +2
    -2
      containers/docker-compose.yml
  3. +3
    -7
      containers/webserver/httpd-ssl.conf

+ 2
- 0
containers/backend/lesspass/settings.py Ver ficheiro

@@ -150,6 +150,8 @@ REST_FRAMEWORK = {
'TEST_REQUEST_DEFAULT_FORMAT': 'json'
}

SITE_NAME = "LessPass"
DOMAIN = env("FRONTEND_HOST", default="www.lesspass.com")

class DisableMigrations(object):
def __contains__(self, item):


+ 2
- 2
containers/docker-compose.yml Ver ficheiro

@@ -6,8 +6,8 @@ services:
volumes:
- postgresql:/var/lib/postgresql/data
environment:
- POSTGRES_DB
- POSTGRES_USER
- POSTGRES_DB=${DATABASE_NAME}
- POSTGRES_USER=${DATABASE_USER}
- POSTGRES_PASSWORD=${DATABASE_PASSWORD}
backend:
restart: always


+ 3
- 7
containers/webserver/httpd-ssl.conf Ver ficheiro

@@ -153,13 +153,9 @@ ServerAdmin EMAIL
</VirtualHost>

<VirtualHost *:443>
ServerName FQDN
ServerName FQDN
ServerAlias www.FQDN

Redirect / https://www.FQDN/
</VirtualHost>

<VirtualHost *:443>
ServerName www.FQDN
ProxyPass /api/ http://backend:8000/api/
ProxyPassReverse /api/ http://backend:8000/api/
ProxyPass / http://frontend/
@@ -167,4 +163,4 @@ ServerAdmin EMAIL
SSLEngine on
SSLCertificateFile "/usr/local/apache2/conf/CRT_PATH"
SSLCertificateKeyFile "/usr/local/apache2/conf/KEY_PATH"
</VirtualHost>
</VirtualHost>

Carregando…
Cancelar
Guardar