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

Reworks CSP and CSS in demos; noop #290

Merged
merged 1 commit into from
Mar 19, 2025
Merged

Reworks CSP and CSS in demos; noop #290

merged 1 commit into from
Mar 19, 2025

Conversation

klebba
Copy link
Collaborator

@klebba klebba commented Mar 19, 2025

MIME TYPE TEXT/CSS ... NO BIG DEAL

@klebba klebba requested a review from theengineear March 19, 2025 19:47
below to allow any access to https://esm.sh/. You wouldn’t want to do
that on a production site, this is just for the demo. -->
<meta http-equiv="content-security-policy" content="default-src 'self'; script-src 'self' 'sha256-tqJYP2BfE6OLuQk1TacH2iYQga16y7fS413atm5uM9o=' https://esm.sh/;">
<meta http-equiv="content-security-policy" content="
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

the people must know

Copy link
Collaborator

Choose a reason for hiding this comment

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

Fair enough. I was definitely waffling on this one.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

for me it is important to be able to be able to compare and contrast the requirements for each integration. also wanted to avoid perpetuating less secure solutions that could be copy+pasted directly regardless of whatever caveats we write in comments

Copy link
Collaborator

Choose a reason for hiding this comment

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

For sure, I had just stopped when I was pasting %-encoded cruft. Will it work if we rewrite it as 'https://esm.sh/udomdiff@^1.1.0'?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

oh yeah, noice

@@ -10,7 +10,7 @@
}
}
</script>
<script type="module" src="./demo-lit-html.js"></script>
<script type="module" blocking="render" src="./demo-lit-html.js"></script>
Copy link
Collaborator

Choose a reason for hiding this comment

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

default-src 'self';
script-src 'self' 'unsafe-eval' 'sha256-2gPcHEAV/bRWIxMnz3UA5z6w2m9RdFis8ZAa8Y/EZVg='
https://esm.sh/[email protected]
https://esm.sh/[email protected]/;">
Copy link
Collaborator

Choose a reason for hiding this comment

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

I was one-lining this stuff because any other formatting choice seemed wonky. I’m totally fine with this for now, but I think we might want to take a moment to discuss the conventions here 🤙

https://esm.sh/[email protected]/
https://esm.sh/[email protected]/
https://esm.sh/scheduler@%5E0.23.2
https://esm.sh/[email protected]/;">
Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh, you did the thing. Nice.

theengineear
theengineear previously approved these changes Mar 19, 2025
Copy link
Collaborator

@theengineear theengineear left a comment

Choose a reason for hiding this comment

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

Nice!

https://esm.sh/[email protected]/
https://esm.sh/custom-function@^1.0.6/
https://esm.sh/[email protected]/
https://esm.sh/@webreflection/;">
Copy link
Collaborator

Choose a reason for hiding this comment

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

^^ I like this formatting style. Mind making it consistent for the other CSP declarations?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

Copy link
Collaborator

@theengineear theengineear left a comment

Choose a reason for hiding this comment

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

Awesome, thanks!!

@klebba klebba merged commit c759474 into main Mar 19, 2025
1 check passed
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.

2 participants