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:
@@ -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?
|
||||
|
@@ -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 -}}
|
||||
|
@@ -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]]
|
||||
|
Reference in New Issue
Block a user