Fix "is not" vs "!="
All checks were successful
Build and Publish / build_and_publish (push) Successful in 31s
All checks were successful
Build and Publish / build_and_publish (push) Successful in 31s
This commit is contained in:
parent
05f39a0a9f
commit
7eee976692
2 changed files with 2 additions and 1 deletions
|
@ -8,6 +8,7 @@ services:
|
|||
#- CONTACT_NAME=Your Name Here
|
||||
#- CONTACT_EMAIL=your@email.example
|
||||
#- CONTACT_URL=https://your.website.example/contact
|
||||
#- ALLOW_ANONYMOUS=false # Disable creation for anonymous users
|
||||
depends_on:
|
||||
- db
|
||||
db:
|
||||
|
|
|
@ -144,7 +144,7 @@ async def create_redirect(
|
|||
slug_type: str = Form("urlsafe", regex="^(urlsafe|hex|words|uuid)$"),
|
||||
account: typing.Annotated[db.Account, Depends(has_account)] = None
|
||||
):
|
||||
if os.getenv("ALLOW_ANONYMOUS", "true") is not "true":
|
||||
if os.getenv("ALLOW_ANONYMOUS", "true") != "true":
|
||||
if account is None:
|
||||
raise HTTPException(status_code=401, detail="Unauthorised", headers={"WWW-Authenticate": "Basic"})
|
||||
parsed = urlparse(destination)
|
||||
|
|
Loading…
Reference in a new issue