mygit

[UNMAINTAINED] A cgit/webgit alternative, written in Rust
Log | Files | Refs | README | LICENSE

commit cf81aa091fd37dddff47eb276c3b65b6d373735a
parent 0b8e2eec8f115fecdc0abe849971b7150fb6e8f7
Author: Johann150 <johann@qwertqwefsday.eu>
Date:   Fri, 16 Apr 2021 13:01:05 +0200

add anti-FLoC header

Taking care of Google's bullshit with the least amount of effort, maybe this
should be separated into another middleware?

Diffstat:
Msrc/errorpage.rs | 1+
Mtemplates/base.html | 3++-
2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/errorpage.rs b/src/errorpage.rs @@ -46,6 +46,7 @@ impl<State: Clone + Send + Sync + 'static> Middleware<State> for ErrorToErrorpag } } + response.insert_header("Permissions-Policy", "interest-cohort=()"); Ok(response) } } diff --git a/templates/base.html b/templates/base.html @@ -2,6 +2,7 @@ <html lang="en"> <head> <meta charset="utf-8"> + <meta http-equiv="Permissions-Policy" content="interest-cohort=()"/> <link rel="stylesheet" type="text/css" href="/style.css" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0,user-scalable=0" /> <link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>{{crate::CONFIG.emoji_favicon}}</text></svg>"> @@ -15,7 +16,7 @@ </div> <hr class="thin"> <div class="footer"> - Server running <a href="https://git.alexwennerberg.com/mygit">mygit</a> + Server running <a href="https://git.alexwennerberg.com/mygit">mygit</a> </div> </body> </html>