TeamHG-Memex / autologin-middleware

Scrapy middleware for the autologin
37 stars 15 forks source link

don't send requests to autologin through proxy #8

Closed kmike closed 8 years ago

kmike commented 8 years ago

When HTTP(S)_PROXY option is enabled then Scrapy spider is likely to send all requests through this proxy (given that an appropriate middleware is enabled). AutologinMiddleware passes this option to Autologin, so that Autologin uses the same proxy. But the request to Autologin itself is still proxied. This cause problems e.g. when Autologin is only available at localhost.

After this change no proxy will be used for connecting to Autologin API.

We can add another option, to set a proxy for connecting to Autologin API, but I think this use case shouldn't be common, we can do it later if needed.

codecov-io commented 8 years ago

Current coverage is 83.54%

Merging #8 into master will decrease coverage by 1.26%

@@             master         #8   diff @@
==========================================
  Files             3          3          
  Lines           158        158          
  Methods           0          0          
  Messages          0          0          
  Branches         36         36          
==========================================
- Hits            134        132     -2   
- Misses           11         12     +1   
- Partials         13         14     +1   

Powered by Codecov. Last updated by 3cb2df5...39acac9

lopuhin commented 8 years ago

Yeah, it makes perfect sense!