Skip to content
This repository has been archived by the owner on May 12, 2022. It is now read-only.

Why https import support? #37

Open
zaripych opened this issue May 11, 2022 · 0 comments
Open

Why https import support? #37

zaripych opened this issue May 11, 2022 · 0 comments

Comments

@zaripych
Copy link

Hey, thanks for building the package!

Re: #34

I've looked at the code and I think it's a little dangerous to allow https imports without even mentioning anything in the README.md. I discovered this by an accident as I was trying to understand how to configure stuff. I tested this behaviour and seems to be working and I was able to import an arbitrary JS file hosted on arbitrary domain using this loader.

I'm new to this concept and I understand that there is Deno and --experimental-network-imports in Node but I didn't expect this behaviour from a small loader library. I also understand that this is how browsers work, but they have a ton of security around that, like CORS and policies you can setup to allow only certain domains.

I feel this at least should be mentioned in the README.md so people who care about security maybe consider this before they adopt the package.

Is it really crucial for this library to support it? How do I disable it? How can I allow only certain domains I trust?

Cheers!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant