Skip to content

Commit 53600b1

Browse files
author
Jan Henning Thorsen
committed
Revert "Add Content-Security-Policy header to Convos #508 #567"
This reverts commit 1091cfe.
1 parent 68ab978 commit 53600b1

File tree

2 files changed

+0
-29
lines changed

2 files changed

+0
-29
lines changed

Diff for: lib/Convos.pm

-18
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ sub _before_dispatch {
132132
$settings->save_p({base_url => $base_url}) if !CONVOS_GET and $settings->base_url ne $base_url;
133133
$c->app->sessions->secure($ENV{CONVOS_SECURE_COOKIES} || $base_url->scheme eq 'https' ? 1 : 0);
134134
$c->res->headers->header('X-Provider-Name', 'ConvosApp');
135-
$c->res->headers->content_security_policy($c->app->_content_security_policy);
136135

137136
# Used when registering the first user
138137
$c->stash(first_user => 1) if !$c->session('email') and !$c->app->core->n_users;
@@ -161,23 +160,6 @@ sub _config {
161160
return $config;
162161
}
163162

164-
sub _content_security_policy {
165-
return join(' ',
166-
map {"$_;"} q(block-all-mixed-content),
167-
q(base-uri 'self'),
168-
q(connect-src 'self'),
169-
q(frame-ancestors 'none'),
170-
q(manifest-src 'self'),
171-
q(default-src 'none'),
172-
q(font-src 'self'),
173-
q(frame-src 'self'),
174-
q(img-src *),
175-
q(object-src 'none'),
176-
q(script-src 'self' 'unsafe-inline' 'unsafe-eval'),
177-
q(style-src 'self' 'unsafe-inline'),
178-
);
179-
}
180-
181163
sub _home_in_share {
182164
my $self = shift;
183165
my $rel = path(qw(auto share dist Convos))->to_string;

Diff for: t/web-production.t

-11
This file was deleted.

0 commit comments

Comments
 (0)