asciimoo / morty

Privacy aware web content sanitizer proxy as a service
GNU Affero General Public License v3.0
485 stars 58 forks source link

(my)CSP and inline style #114

Open surtarso opened 2 years ago

surtarso commented 2 years ago

Hi there, CSP doesn't really like the script tag in html's. I couldnt find the served html file on my disk to change it myself, so here I am =)

this part

<style>
html { height: 100%; }
body { min-height : 100%; display: flex; flex-direction:column; font-family: 'Garamond', 'Georgia', serif; text-align: center; color: #444; background: #FAFAFA; margin: 0; padding: 0; font-size: 1.1em; }
input { border: 1px solid #888; padding: 0.3em; color: #444; background: #FFF; font-size: 1.1em; }
input[placeholder] { width:80%; }
a { text-decoration: none; #2980b9; }
h1, h2 { font-weight: 200; margin-bottom: 2rem; }
h1 { font-size: 3em; }
.container { flex:1; min-height: 100%; margin-bottom: 1em; }
.footer { margin: 1em; }
.footer p { font-size: 0.8em; }
</style>

should be gone to a .css file and linked to the html with type= and rel= or it's ignored by CSP inline restrictions I know its a background service, but sometimes I use it standalone too... and I like it pretty =)

So if you think this should be changed or want to point me in the right direction of the html folder/file so I can change just locally here, that'd be great! thx for your hard work!