From 7aa677e6e25a1fdaf7cd966c5b1af58e9333e87f Mon Sep 17 00:00:00 2001
From: Lim Chee Aun
Date: Thu, 23 Jan 2025 21:17:58 +0800
Subject: [PATCH] Allow configure referrer policy
---
README.md | 5 +
src/components/account-info.jsx | 6 +-
src/components/embed-modal.jsx | 7 +-
src/components/notification.jsx | 8 +-
src/components/status.jsx | 8 +-
src/locales/en.po | 274 ++++++++++++++++----------------
src/pages/catchup.jsx | 2 +-
src/pages/http-route.jsx | 4 +-
src/pages/settings.jsx | 32 ++--
src/pages/trending.jsx | 4 +-
src/utils/enhance-content.js | 2 +-
vite.config.js | 8 +
12 files changed, 180 insertions(+), 180 deletions(-)
diff --git a/README.md b/README.md
index 47fbe022..4543ef79 100644
--- a/README.md
+++ b/README.md
@@ -233,6 +233,11 @@ Available variables:
- `PHANPY_DEFAULT_LANG` (optional):
- Default language is English (`en`) if not specified.
- Fallback language after multiple detection methods (`lang` query parameter, `lang` key in `localStorage` and `navigator.language`)
+- `PHANPY_REFERRER_POLICY` (optional, default: `origin`):
+ - Referrer policy for the site. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy).
+ - This is applied with the `` tag on the client-side.
+ - The policy can also be set with `Referrer-Policy` header configured on the server-side (not this variable).
+ - Note that since Phanpy uses hash-based URLs, the referrer does not include the hash part.
- `PHANPY_LINGVA_INSTANCES` (optional, space-separated list, default: `lingva.phanpy.social [...hard-coded list of fallback instances]`):
- Specify a space-separated list of instances. First will be used as default before falling back to the subsequent instances. If there's only 1 instance, means no fallback.
- May specify a self-hosted Lingva instance, powered by either [lingva-translate](https://github.com/thedaviddelta/lingva-translate) or [lingva-api](https://github.com/cheeaun/lingva-api)
diff --git a/src/components/account-info.jsx b/src/components/account-info.jsx
index fe30bf0d..07ea4da8 100644
--- a/src/components/account-info.jsx
+++ b/src/components/account-info.jsx
@@ -379,11 +379,7 @@ function AccountInfo({
Unable to load account.