Skip to content

Commit

Permalink
Fix when setting token with docker secret
Browse files Browse the repository at this point in the history
  • Loading branch information
hv0905 committed Apr 23, 2024
1 parent 18e15a7 commit 42939ac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
4 changes: 4 additions & 0 deletions app/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,8 @@ class Environment(BaseModel):


config = Config()
if config.access_token:
config.access_token = config.access_token.strip(' \n\t\r')
if config.admin_token:
config.admin_token = config.admin_token.strip(' \n\t\r')
environment = Environment()
8 changes: 0 additions & 8 deletions config/default.env
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,3 @@ APP_STATIC_FILE__PATH="./static"

# Server Configuration
APP_CORS_ORIGINS=["*"]

# Set to False will completely disable admin API
APP_ADMIN_API_ENABLE=False
# Use this token to access admin API. Disable token check by setting it to None
APP_ADMIN_TOKEN="your-super-secret-admin-token"

APP_ACCESS_PROTECTED=False
APP_ACCESS_TOKEN="your-super-secret-access-token"

0 comments on commit 42939ac

Please sign in to comment.