Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frontend API preflight support #359

Merged
merged 14 commits into from
Nov 2, 2023
Merged

Frontend API preflight support #359

merged 14 commits into from
Nov 2, 2023

Conversation

doubaniux
Copy link

No description provided.

common/api.py Outdated
if not token or not request.user.is_authenticated:
_logger.debug("API auth: no access token or user not authenticated")
return False
request_scopes = []
if request.method in ["GET", "HEAD", "OPTIONS"]:
request_method = request.method.upper()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe remove .upper() here? it triggers a pyright warning, and request methods, if presented, are guaranteed upper case anyway, code in Django doc don't convert it either.

https://docs.djangoproject.com/en/4.2/topics/forms/#using-a-form-in-a-view

@alphatownsman alphatownsman merged commit 38cf237 into main Nov 2, 2023
5 of 6 checks passed
@alphatownsman alphatownsman deleted the webapp branch November 2, 2023 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants