瀏覽代碼

fixing subdomain redirection in Flask

joel
Simon Bowie 2 年之前
父節點
當前提交
cb027b0171
共有 1 個檔案被更改,包括 2 行新增1 行删除
  1. +2
    -1
      web/app/__init__.py

+ 2
- 1
web/app/__init__.py 查看文件

moment = Moment() moment = Moment()


def create_app(): def create_app():
app = Flask(__name__)
app = Flask(__name__, subdomain_matching=True)
app.config['SERVER_NAME'] = os.environ.get('SERVER_NAME')


# get config variables from OS environment variables: set in env file passed through Docker Compose # get config variables from OS environment variables: set in env file passed through Docker Compose
app.config['SECRET_KEY'] = os.environ.get('SECRET_KEY') app.config['SECRET_KEY'] = os.environ.get('SECRET_KEY')

Loading…
取消
儲存