Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

check secrets and ssl in production #286

Merged
merged 1 commit into from
Aug 25, 2015
Merged

check secrets and ssl in production #286

merged 1 commit into from
Aug 25, 2015

Conversation

jordimassaguerpla
Copy link
Member

If secrets have not been set or ssl, render an error page. This will
prevent running unsafely in production but also provides with a
running application.

The message needs to be rewritten. I'll do that on a separate commit.

@@ -19,6 +20,25 @@ def after_sign_out_path_for(_resource)

protected

def check_requirements
Copy link
Collaborator

Choose a reason for hiding this comment

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

Instead of fix_secrets = false and then the if, do:

fix_secrets = true if Rails.application.secrets.secret_key_base == "CHANGE_ME"

The same for fix_ssl. If the variable is not defined it will be nil, therefore evaluating to false anyways ;) Moreover, rubocop is complaining about the final if statement. Instead of doing that, you should:

return unless fix_secrets || fix_ssl

And then proceed with the code.

Moreover, I'd appreciate if you could add documentation to this method :)

@jordimassaguerpla
Copy link
Member Author

I just rebased according to mssola comments

If secrets have not been set or ssl, render an error page. This will
prevent running unsafely in production but also provides with a
running application.

The message needs to be rewritten. I'll do that on a separate commit.
@mssola
Copy link
Collaborator

mssola commented Aug 25, 2015

There are still some failures, but it looks like it is a commit that I pushed directly before :/ Thanks 👍

mssola added a commit that referenced this pull request Aug 25, 2015
…in_production

check secrets and ssl in production
@mssola mssola merged commit eaea9a7 into SUSE:master Aug 25, 2015
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.

2 participants