filipedeschamps / rss-feed-emitter

Super RSS News Feed aggregator written in Node.js and ES6
MIT License
1.06k stars 77 forks source link

Implement custom headers #207

Open Sazzo opened 3 years ago

Sazzo commented 3 years ago

It would be super cool if we could specify a custom header.

TobiTenno commented 3 years ago

Why? The library is an abstraction of what's needed to pull and feed RSS, and that's a pretty low-level addition... If you can give a use-case, that'd make it possible, but at present... doesn't seem to be much of a reason.

Sazzo commented 3 years ago

Some RSS sites that use Cloudflare or Cors Security block us if we don't use specific headers, so I think it would be useful for that. Sorry for the very poorly explained description in the issue above.

Sazzo commented 3 years ago

Like Crunchyroll for exemple.

TobiTenno commented 3 years ago

What specific headers are you looking for to bypass those? Those sound like things we should just provide in general, not give an option for.

Sazzo commented 3 years ago

Like "x-requested-with" or "origin", i think one of these two is nice to add, since with it you can use a cors proxy (Like cors anywhere)

TobiTenno commented 3 years ago

Sorry, been thinking about what it would mean to add those specifically. I worry that manually setting cors headers isn't really something we should be doing. I've been looking at uplifting to something like node-fetch to work better with cors instead of needing to manually do that kind of thing

Sazzo commented 3 years ago

I made this issue a while ago, so seeing today I agree with you, so, feel free to do.