Federation - Nginx cache creates CORS error
Heyhey !
I just wanted to share the following bug we've encountered when federating instances and using the uwsgi_nginx module
Issue
When the federated server is serving a cache version of the site, calls return a `CORS error`
How we fixed it
This is a temporary fix, as we have to manually list the names of federated instances, so it's not scalable
Within the location /
block of the instance palestine.risefor.org
I added :
## CACHE BREAKS FEDERATION
if ($http_referer ~ "agir.risefor.org" ){
add_header Cache-Control 'no-store, no-cache';
}
After which the calls work fine, as you can see here
We have an open issue on Risefor's git where i will be updating if/when i find a more scalable solution