Skip to content
This repository was archived by the owner on Jul 27, 2025. It is now read-only.

Conversation

@amacleod1417
Copy link

No description provided.

@dwightwatson
Copy link
Contributor

I think the Rails default makes more sense here.

If you genuinely wanted this off in production you could make the change on your end.

@Shpigford
Copy link
Member

What's the scenario for wanting to run this without SSL in a production environment?

@m4tt72
Copy link

m4tt72 commented Feb 5, 2024

What's the scenario for wanting to run this without SSL in a production environment?

When running behind a reverse proxy that already handles SSL

@robzolkos
Copy link
Contributor

robzolkos commented Feb 5, 2024

I think this is what this config setting is for

Reference rails/rails#47139

Docs for assume_ssl

config.force_ssl = true
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
#If the variable is set to 'true', SSL enforcement will be enabled; otherwise, it will be disabled.
config.force_ssl = ENV.fetch("FORCE_SSL", "true") == "true"
Copy link

Choose a reason for hiding this comment

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

Should the default value not a return a boolean value instead of a string?

ENV.fetch("FORCE_SSL", true) == "true"

If there's a better option than using "true" as the value to look for in the environment variable I would use that but I cannot think of one that isn't overly complex.

@haydenk
Copy link

haydenk commented Feb 8, 2024

I agree with most everyone else that it isn't really necessary but I do see one circumstance where this could be useful, it just depends on the direction the project is going.

It's useful if the application is dockerized and you need to change the setting but there isn't an official docker image yet that I can see, so you can just build your own image change the config setting.

If the application goes the direction of pushing an official docker image then this could be useful.

@zachgoll
Copy link
Collaborator

@amacleod1417 let's go ahead and implement the solution proposed here in this issue:

https://github.com/maybe-finance/maybe/issues/308#issuecomment-1934615353

Also, could you please fix the lint errors? Will get this merged after!

@zachgoll
Copy link
Collaborator

Closing for now. Will address SSL in a dedicated issue alongside the creation of an official Dockerfile

@zachgoll zachgoll closed this Feb 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants