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
Issues with proxied @import https urls #741
Comments
Could you please provide a test case with CSS and system proxy settings? I'll try to replicate it locally first. |
@jakubpawlowicz Really thought the error message is already enough to reproduce it. Here is a gist for you https://gist.github.com/wzrdtales/621ff62d38bb94737215 |
Thank you! It's always easier to reproduce an issue with a code snippet to make sure we are on the same page. Can see it failing now. |
When an @import used a https url, the false protocol was tried to be used for the http proxy. Additionally request has replaced a direct http.get and https.get call, to automatically handle proxy environment variables and other possible edge cases. fixes clean-css#741
When an @import used a https url, the false protocol was tried to be used for the http proxy. fixes clean-css#741
When an @import used a https url, the false protocol was tried to be used for the http proxy. fixes clean-css#741
Released in 3.4.11, thanks @wzrdtales! |
When an @import used a https url, the false protocol was tried to be used for the http proxy. fixes clean-css#741
Problem description
If you're using a http proxy the current implementation causes trouble and renders it completely unusable.
Example error:
Gist: https://gist.github.com/wzrdtales/621ff62d38bb94737215
Details
The failure is here;
https://github.com/jakubpawlowicz/clean-css/blob/master/lib/imports/inliner.js#L271-L273
This can't work and wont work if there is only a http proxy, but not a https one. And this is common for mostly all the time, to have just a http proxy.
Possible solutions
Two options to fix this:
request
lib insteadUsing the
request
lib would be also be more convenient for the users, as it automatically parseshttp_proxy
andhttps_proxy
environment variables and handles many edge cases already. Thus the users never need to set any proxy configurations forclean-css
if they are already defined them in their environment.The text was updated successfully, but these errors were encountered: