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

Set the preferred URL scheme in production to https #449

Merged
merged 1 commit into from
May 25, 2024

Conversation

AetherUnbound
Copy link
Collaborator

Description of Changes

We are seeing an issue where calls to url_for using _external=True for certain conditions are generating links to files that include the scheme, but use http for it instead of http. This is causing a mixed content warning with our certificate. I tracked it down to pages that are serving the default placeholder image for officers, e.g.:

{% set image_url = officer.image_url | default(url_for('static', filename='images/placeholder.png', _external=True)) %}
.

image

This PR changes the PREFERRED_URL_SCHEME setting to https for production environments.

Tests and linting

  • I have rebased my changes on main

  • just lint passes

  • just test passes

@AetherUnbound AetherUnbound requested a review from a team as a code owner May 25, 2024 00:27
@AetherUnbound AetherUnbound merged commit cb4fd49 into main May 25, 2024
2 checks passed
@AetherUnbound AetherUnbound deleted the fix/url-scheme-in-prod branch May 25, 2024 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants