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 integrity hashes #50

Closed
Samy-Belarbi opened this issue Jun 16, 2023 · 6 comments
Closed

Add integrity hashes #50

Samy-Belarbi opened this issue Jun 16, 2023 · 6 comments

Comments

@Samy-Belarbi
Copy link

Hi, thanks for you work !
I am wondering if there is any plan (or way) to implement integrity hashes into script / links ?

Could make it work with this repo maybe : https://github.com/ElMassimo/vite-plugin-manifest-sri

Thanks.

@lhapaipai
Copy link
Owner

lhapaipai commented Jun 26, 2023

hi @Samy-Belarbi, I was thinking of looking into this feature this week but I see that you forked the repo maybe you wanted to take care of it ?

@Samy-Belarbi
Copy link
Author

Hey @lhapaipai, i will give it a try at the end of the week but i'm not sure to manage to achieve this with my current skills.

So please do not change your plan of looking into it.

@lhapaipai
Copy link
Owner

hi @Samy-Belarbi, I've implemented the feature in both branches feature/sri.
can you please give me your opinion?
on the other hand for my own knowledge i thought this attribute was important with cdn, is it also for resources that come from the same domain as the one that returns the source html file ? can you explain to me ?

@Samy-Belarbi
Copy link
Author

Hey !

You are right, it's mostly used when you get your assets from a CDN, the browser doesn't load files if they are not matching their integrity hashes, so you are sure you are loading the correct files.

As far as i know, i don't think that's pretty useful if your files come from your own production website because if someone malicious can manipulate your files from it, it would be too late i guess ? Anyway, that can be one more security, but an overkill one.

Amazing work, i can't wait to try it. Merci !

@lhapaipai
Copy link
Owner

lhapaipai commented Jun 29, 2023

Thanks @Samy-Belarbi,
I will therefore check that the configuration of vite and the bundle are compatible with a cdn and I will then publish the update !
I will be inspired by Webpack Encore : https://symfony.com/doc/current/frontend/encore/cdn.html

@lhapaipai
Copy link
Owner

fixed with #52

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

No branches or pull requests

2 participants