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

Speed up redirect function #82

Merged
merged 2 commits into from
Nov 4, 2024
Merged

Conversation

Carlgo11
Copy link
Member

@Carlgo11 Carlgo11 commented Nov 4, 2024

Made some changes to the redirect script.

  • Switched from validating whether the region exists based on GET requests to the frontend to now validate against the API using a HEAD request which should require less data.
  • Updated the cache ttl from 1 week / 1 day to 2 weeks / 1 week.
  • Removed the 503 redirect as if the frontend doesn't work, the 503 page most likely won't work either.
  • Changed redirect status from 302 to 301 as it would be very rare that a device changes region.

@Carlgo11 Carlgo11 added the Code enhancement Enchancements to the website code label Nov 4, 2024
@hkamran80 hkamran80 merged commit e157d11 into 2factorauth:master Nov 4, 2024
@Carlgo11 Carlgo11 deleted the update-redirect branch November 4, 2024 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code enhancement Enchancements to the website code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants