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

Add HTTPS redirect functionality to Cloudflare worker #31

Merged
merged 1 commit into from
Jun 3, 2021

Conversation

tomusher
Copy link
Contributor

@tomusher tomusher commented Jun 3, 2021

Because the worker directly serves the response from the AB Testing API, in cases where the API_BASE is set to use HTTPS, Django sees a secure request, so SECURE_SSL_REDIRECT won't kick in and correctly redirect the user.

To workaround this, this MR adds simple HTTPS redirect functionality to the worker.

@kaedroho kaedroho self-requested a review June 3, 2021 14:52
Copy link
Collaborator

@kaedroho kaedroho left a comment

Choose a reason for hiding this comment

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

Thanks!

@kaedroho kaedroho merged commit e33aeaa into main Jun 3, 2021
@kaedroho kaedroho deleted the cloudflare-worker-https-redirect branch June 3, 2021 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants