matteocontrini / node-bypasser

Bypass URL shortener websites
MIT License
34 stars 26 forks source link

Add a simple 301 redirect sites like goo.gl, bit.ly #4

Closed thangngoc89 closed 9 years ago

thangngoc89 commented 9 years ago

This is a dirty hack of mine. But it works. I wonder should we treat all the unrecognized url this way. And if there is no response.headers.location then throw error?

matteocontrini commented 9 years ago

If the response code is 301 or 302, response.headers.location should be always there. A check for it to exist wouldn't be bad, anyway.

I guess that yes, all the unknown hosts should be handled like this. You can create a service called "Generic" or "Unknown" without hosts and then you "select" it at this line.

Giving you write access to this repo in a minute so that you can work freely :)

thangngoc89 commented 9 years ago

Giving you write access to this repo in a minute so that you can work freely :)

Thank you.

thangngoc89 commented 9 years ago

Closed. Will create a generic service