Skip to content

Use integrity on combined stylesheet#197

Open
ChiefOfGxBxL wants to merge 1 commit intotomfran:mainfrom
ChiefOfGxBxL:patch-1
Open

Use integrity on combined stylesheet#197
ChiefOfGxBxL wants to merge 1 commit intotomfran:mainfrom
ChiefOfGxBxL:patch-1

Conversation

@ChiefOfGxBxL
Copy link

The combined stylesheet logic in the "head" partial pipes the combined CSS resource through fingerprint, but doesn't actually use the integrity attribute on the <link rel="stylesheet">. This PR adds that. (By default, fingerprint uses SHA-256.)

For comparison, the JavaScript file gets a fingerprint: https://github.com/tomfran/typo/blob/main/layouts/partials/head/js.html#L4

Example before/after:

-<link rel="stylesheet" href="/assets/combined.min.250f6f39f6b03639f082d271f32e1a4b73188f6df4446bf2261557673368e503.css" media="all">
+<link rel="stylesheet" href="/assets/combined.min.250f6f39f6b03639f082d271f32e1a4b73188f6df4446bf2261557673368e503.css" integrity="sha256-JQ9vOfawNjnwgtJx8y4aS3MYj230RGvyJhVXZzNo5QM=" media="all">

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.

1 participant