浏览代码

Fix preflight CORS redirect issue

pull/544/head
Guillaume Vincent 4 年前
父节点
当前提交
ee30d0528c
共有 3 个文件被更改,包括 7 次插入9 次删除
  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 查看文件

@@ -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 查看文件

@@ -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 查看文件

@@ -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>

正在加载...
取消
保存