diff --git a/docker/web_nginx.conf b/docker/web_nginx.conf index 8390cfcf2649..7ae9448db755 100644 --- a/docker/web_nginx.conf +++ b/docker/web_nginx.conf @@ -23,6 +23,13 @@ server { include /run/secrets/petabox_seed; + # Set the referrer policy so browsers send referrers to our own servers + # In July 2020, Chrome changed its default referrer policy so any cross-origin + # requests only sent the root referrer `/`. Since openlibrary.org + # has a different "origin" than analytics.archive.org, the full referrer + # path is not sent. This changes the behavior back to the pre-July 2020 change. + add_header Referrer-Policy "no-referrer-when-downgrade"; + root /openlibrary; # Show closed-library page on errors.