1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-09-17 17:35:31 -04:00

add Onion-Location header to each page with relative URLs (#401)

http://jarvisz2fxjx54yve4zgtp5rehnwehu22nkww47dg2qv4e6xxzq6fdyd.onion
This commit is contained in:
2021-05-16 11:18:26 -04:00
committed by GitHub
parent b182ed86d2
commit af3f5eeb7b
3 changed files with 14 additions and 1 deletions

View File

@@ -28,6 +28,7 @@ disableAliases = true
description = "Hi there! I'm a frontend web developer based in Boston, Massachusetts specializing in the JAMstack, modern JavaScript frameworks, and progressive web apps."
image = "img/logo.png" # relative to assetDir root
mainSection = "notes" # content that appears in feeds
baseOnionURL = "http://jarvisz2fxjx54yve4zgtp5rehnwehu22nkww47dg2qv4e6xxzq6fdyd.onion"
[params.theme]
maxWidth = 865 # px
defaultTheme = "light" # light or dark?

View File

@@ -11,3 +11,16 @@
# https://developers.google.com/amp/cache/update-cache#update-cache-guidelines
/.well-known/amphtml/apikey.pub
Content-Type: text/plain; charset=UTF-8
# Set Source and Onion-Location headers based on each URL
{{- range $page := .Site.Pages }}
{{ $page.RelPermalink }}
Onion-Location: {{ print .Site.Params.baseOnionURL $page.RelPermalink }}
X-View-Source: {{ .Scratch.Get "sourceURL" }}
{{ if and .IsPage (ne .Params.amp false) -}}
{{ print $page.RelPermalink "amp.html" }}
Onion-Location: {{ print .Site.Params.baseOnionURL $page.RelPermalink "amp.html" }}
X-View-Source: {{ .Scratch.Get "sourceURL" }}
{{- end }}
{{ end -}}

View File

@@ -94,7 +94,6 @@
X-Content-Type-Options = "nosniff"
X-Frame-Options = "SAMEORIGIN"
X-XSS-Protection = "1; mode=block"
X-View-Source = "https://jrvs.io/src"
X-Got-Milk = "2%"
# PGP key: open in browser, download correctly
[[headers]]