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 CSP tags to default layout #1630

Merged
merged 1 commit into from
Oct 6, 2020

Conversation

betelgeuse
Copy link
Contributor

This is needed to get Trix and CSP to play together.

@betelgeuse betelgeuse marked this pull request as draft April 29, 2020 23:46
@betelgeuse betelgeuse marked this pull request as ready for review April 30, 2020 00:18
Copy link
Member

@nickcharlton nickcharlton left a comment

Choose a reason for hiding this comment

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

Thanks!

@@ -23,6 +23,8 @@ By default, it renders:
</title>
<%= render "stylesheet" %>
<%= csrf_meta_tags %>
<%# Added in Rails 5.2 %>
Copy link
Member

Choose a reason for hiding this comment

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

Can we drop the comment? I don't think we need it as it'll be there now for a long time

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was thinking it would increase the chances that the defined? would be dropped when only >= 5.2 is supported. Should we inspect Rails::VERSION?

Copy link
Member

Choose a reason for hiding this comment

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

Ah yes. I think we're okay here: we should mention in the commit message that exists from Rails 5.2 and up.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I created an issue to look into compatibility detection: #1631

@nickcharlton nickcharlton added views-and-styles how administrate looks and is interacted with feature new functionality that’s not yet implemented labels Jun 25, 2020
This is needed to get Trix and CSP to play together.
@nickcharlton nickcharlton merged commit cdf6628 into thoughtbot:master Oct 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature new functionality that’s not yet implemented views-and-styles how administrate looks and is interacted with
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants