hyperobject / crossorigin.me

A CORS proxy for everyone.
http://crossorigin.me
MIT License
677 stars 132 forks source link

Setting the cache control #114

Open paolobarbolini opened 6 years ago

paolobarbolini commented 6 years ago

Have you ever thought of adding the ability to set the cache control of a response? This would be extremely useful for a few reasons:

  1. Cloudflare would cache the response in their cdn, reducing the load on your servers for particularly popular urls.
  2. We wouldn't hammer the origin servers receiving the request
  3. We would get better performance, since we could get an answer from a closer cdn node or for origins far from crossorigin.me servers, this would be extremely useful for a project I'm currently working on which requests pages from a website hosted in Italy, which currently takes 4 seconds.

I could implement this myself if you like this idea.

hyperobject commented 6 years ago

If you'd like to try implementing this, that would be fantastic!