-
-
Notifications
You must be signed in to change notification settings - Fork 941
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
file:// protocol support #227
Comments
Why? Please include a issue description. |
Original comment updated. |
Haven't had a chance to think this through yet, but sounds like a pretty good venue for security issues. |
|
Please read the actual text there about it. |
Make it optional, then. That way, we could do something like: const baseUrl = new URL("http://domain/")
const url = new URL("file://dir/file", baseUrl)
got(url, { supportFileProtocol: baseUrl.protocol==="file:" }) // origin error |
Now that I think of it, a separate package should be written to handle this as it can then be used with any similar request library. If we want, we can document its use in this package's readme. |
@stevenvachon are you aware of any such package? |
@tommedema no, but I also haven't begun to use this library yet either. |
Going to pass on this. See node-fetch/node-fetch#75 (comment) for reasoning. |
I don't think it's a good idea, it could lead to potential security issues. |
It'd be convenient to not have to handle this ourselves each time we need it.
Use cases:
The text was updated successfully, but these errors were encountered: