frame-ancestors 'none'
img-src 'self' https://static.mindcoding.ro
referrer origin-when-cross-origin
-script-src https://static.mindcoding.ro/static/js.js
-style-src https://static.mindcoding.ro/static/css/
+script-src 'self'
+style-src 'self'
CSP
chomp $csp;
$csp =~ s/\n/; /gr;
my $resp = $app->($_[0]);
my $hdrs = Plack::Util::headers($resp->[1]);
$hdrs->set('Content-Security-Policy', CONTENT_SECURITY_POLICY);
- $hdrs->set('Link', '<https://static.mindcoding.ro/static/slate.css>; rel=stylesheet') if $hdrs->get('Content-Type') =~ m,^text/html,;
+ $hdrs->set('Link', '</static/slate.css>; rel=stylesheet') if $hdrs->get('Content-Type') =~ m,^text/html,;
$resp->[1] = $hdrs->headers;
$resp;
}
$maker->print_css(
filename => 'css/logos.css',
- sprite_filename => 'https://static.mindcoding.ro/static/logos.png',
+ sprite_filename => '/static/logos.png',
);
system 'pngnq-s9', '-s1', 'static/logos.png';
@ret = sort @ret;
unshift @ret, <<EOF;
a.logo {
- background-image: url("https://static.mindcoding.ro/static/logos.png");
+ background-image: url("/static/logos.png");
background-repeat: no-repeat;
display: inline-block;
vertical-align: middle;
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
-<link href="https://static.mindcoding.ro/static/favicon.png" rel="shortcut icon">
-<link href="https://static.mindcoding.ro/static/css/cyborg.css" title="cyborg" rel="alternate stylesheet">
-<link href="https://static.mindcoding.ro/static/css/slate.css" title="slate" rel="stylesheet">
-<link href="https://static.mindcoding.ro/static/css/readable.css" title="readable" rel="alternate stylesheet">
-<script src="https://static.mindcoding.ro/static/js.js" type="text/javascript" async defer></script>
+<link href="/static/favicon.png" rel="shortcut icon">
+<link href="/static/css/cyborg.css" title="cyborg" rel="alternate stylesheet">
+<link href="/static/css/slate.css" title="slate" rel="stylesheet">
+<link href="/static/css/readable.css" title="readable" rel="alternate stylesheet">
+<script src="/static/js.js" type="text/javascript" async defer></script>
<body>
<nav role="navigation">