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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add opt of forceScheme(https) #3710

Merged

Conversation

thisislawatts
Copy link
Contributor

@thisislawatts thisislawatts commented Oct 22, 2022

When running the application locally with
APP_URL=http://localhost it is unexpected for
all route URLs returned by route('route-name')
to use the https prefix.

Configuring SSL for your local environment should
not be a required step to development locally.

The new logic checks the configured URL for presence
of https:// OR that this the application is running
in a production environment.

I have not worked with Laravel before, so very open to pointers
for alternative places this could be handled. 馃

@thisislawatts thisislawatts changed the base branch from dev to staging October 23, 2022 13:08
When running the application locally with
APP_URL=http://localhost it is unexpected for
all route URLs returned by `route('route-name')`
to use the https prefix.

Configuring SSL for your local environment should
not be a required step to development locally.

The new logic checks the configured URL for presence
of https:// OR that this the application is running
in a production environment.
@dansup
Copy link
Member

dansup commented Dec 2, 2022

@thisislawatts Thanks for the PR, this isn't the ideal way to disable it as there could be situations where your running in production and still want to disable it so I'll merge this and update it a bit to use the FORCE_HTTPS_URLS .env variable (enabled by default).

@dansup dansup merged commit f776c79 into pixelfed:staging Dec 2, 2022
dansup added a commit that referenced this pull request Dec 2, 2022
yourivdlans pushed a commit to yourivdlans/pixelfed that referenced this pull request Jul 7, 2023
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.

None yet

2 participants