Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add IF Archive and subdomains to direct domains list #151

Conversation

dfabulich
Copy link
Contributor

Apropos #149

  1. IF Archive has CORS headers; there's no need to use the proxy in this case. We could whitelist some domains and list them as not requiring a proxy.
  2. Instead of (or as well as) whitelisting, on the client-side, we could optimistically try to fetch a files directly; fall back to the proxy only if the fetch request fails.
  3. Update the Cache-Control header to use stale-while-revalidate https://web.dev/articles/stale-while-revalidate perhaps something like: Cache-Control: max-age=60, stale-while-revalidate=604800.
    Unfortunately, Cloudflare doesn't support stale-while-revalidate yet; they say it's coming later this year.

This implements option 1, but I'm not sure we should do it this way; perhaps we should do option 2 instead, in PR #150.

@curiousdannii curiousdannii merged commit 6256195 into curiousdannii:master Aug 12, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants