Updated Pi hole (markdown)
parent
2158670834
commit
ddd4024e50
26
Pi-hole.md
26
Pi-hole.md
@ -13,21 +13,23 @@ space-gray.css
|
|||||||
plex.css
|
plex.css
|
||||||
```
|
```
|
||||||
|
|
||||||
> ⚠️ : **CSP**: Because Pi-hole uses CSP it will block any attempts to inject stylesheets.
|
### CSP
|
||||||
I've tried to strip away the headers with nginx using
|
> ⚠️ Because Pi-hole uses CSP it will block any attempts to inject stylesheets.
|
||||||
|
|
||||||
|
This will add `https://raw.githubusercontent.com` and `https://gilbn.github.io` to the CSP meta tag in the HTML. Allowing you to load the custom css.
|
||||||
|
|
||||||
```nginx
|
```nginx
|
||||||
proxy_hide_header "x-webkit-csp";
|
proxy_set_header Accept-Encoding "";
|
||||||
proxy_hide_header "content-security-policy";
|
sub_filter
|
||||||
|
'<meta http-equiv="Content-Security-Policy" content="default-src \'self\' https://api.github.com; script-src \'self\' \'unsafe-eval\' \'unsafe-inline\'; style-src \'self\' \'unsafe-inline\'">'
|
||||||
|
'<meta http-equiv="Content-Security-Policy" content="default-src \'self\' https://raw.githubusercontent.com https://api.github.com; script-src \'self\' \'unsafe-eval\' \'unsafe-inline\'; style-src \'self\' https://gilbn.github.io \'unsafe-inline\'">';
|
||||||
|
sub_filter
|
||||||
|
'</head>'
|
||||||
|
'<link rel="stylesheet" type="text/css" href="https://gilbn.github.io/theme.park/CSS/themes/pihole/<THEME>.css">
|
||||||
|
</head>';
|
||||||
|
sub_filter_once on;
|
||||||
```
|
```
|
||||||
But Pi-hole still blocks it. So for now [Stylus](https://github.com/gilbN/theme.park/wiki/Setup#stylus-method) or [Blackberry installer](https://github.com/gilbN/theme.park/wiki/Setup#blackberry-theme-installer-method) is the only way I know you can add it.
|
|
||||||
|
|
||||||
I will add the correct Nginx config when I figure it out.
|
|
||||||
|
|
||||||
### If you have a working CSP config, please share it :)
|
|
||||||
|
|
||||||
### plex.css
|
|
||||||
Pi-hole also uses https://api.github.com in their CSP directive, so that will block loading the backgrounds even when using Stylus.
|
|
||||||

|
|
||||||
|
|
||||||
### Screenshots
|
### Screenshots
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user