Skip to content

Commit ca48509

Browse files
authored
Merge pull request #35 from JonDevOps/claude/onion-location
Onion-Location header for the Tor address (#345)
2 parents c04f1d0 + e570255 commit ca48509

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

‎next.config.js‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
// Functions), App Check's reCAPTCHA, Google Analytics, and the Discord and
44
// YouTube embeds. Images can come from any https address, since profile
55
// pictures are links members add.
6+
// w3Develops' Tor onion service (issue #345), which proxies to this site
7+
const ONION_HOST = 'byexy3vcngbhih4hbp4ssfefum2liaegw4hn4mm3q5apetxtgz4bq2yd.onion';
8+
69
const CONTENT_SECURITY_POLICY = [
710
"default-src 'self'",
811
"script-src 'self' 'unsafe-inline' https://www.google.com https://www.gstatic.com https://apis.google.com https://www.googletagmanager.com",
@@ -54,6 +57,11 @@ const nextConfig = {
5457
// Content-Security-Policy to enforce it.
5558
{ key: 'Content-Security-Policy-Report-Only', value: CONTENT_SECURITY_POLICY },
5659
],
60+
}, {
61+
// Tor Browser offers the site's onion address (issue #345), served by
62+
// a Tor onion service that proxies to this site
63+
source: '/:path*',
64+
headers: [{ key: 'Onion-Location', value: `http://${ONION_HOST}/:path*` }],
5765
}];
5866
},
5967
async redirects() {

‎src/components/layout/footer.tsx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ export default function Footer() {
108108
<Link href="/code-of-conduct" className="text-primary hover:underline">Code of Conduct</Link>
109109
<Link href="/time-converter" className="text-primary hover:underline">Time Converter</Link>
110110
<Link href="/warrant-canary" className="text-primary hover:underline">Warrant Canary</Link>
111+
{/* The Tor onion service (issue #345); the same address is in next.config.js */}
112+
<a href="http://byexy3vcngbhih4hbp4ssfefum2liaegw4hn4mm3q5apetxtgz4bq2yd.onion" className="text-primary hover:underline" title="byexy3vcngbhih4hbp4ssfefum2liaegw4hn4mm3q5apetxtgz4bq2yd.onion (open in Tor Browser)">Tor (.onion)</a>
111113
</div>
112114
</div>
113115

0 commit comments

Comments
 (0)