filipedeschamps/rss-feed-emitter

Implement custom headers

Sazzo opened this issue · 7 comments

Sazzo commented

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

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

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

Like Crunchyroll for exemple.

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

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)

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

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