diff --git a/relay/application.py b/relay/application.py
index 3743612..b3da393 100644
--- a/relay/application.py
+++ b/relay/application.py
@@ -140,25 +140,6 @@ class Application(web.Application):
return '; '.join(data) + ';'
- # data = {
- # 'base-uri': '\'none\'',
- # 'default-src': '\'none\'',
- # 'frame-ancestors': '\'none\'',
- # 'font-src': f'\'self\' https://{self.config.domain}',
- # 'img-src': f'\'self\' https://{self.config.domain}',
- # 'style-src': f'\'self\' https://{self.config.domain} \'nonce-randomstringhere\'',
- # 'media-src': f'\'self\' https://{self.config.domain}',
- # 'frame-src': f'\'self\' https:',
- # 'manifest-src': f'\'self\' https://{self.config.domain}',
- # 'form-action': f'\'self\'',
- # 'child-src': f'\'self\' https://{self.config.domain}',
- # 'worker-src': f'\'self\' https://{self.config.domain}',
- # 'connect-src': f'\'self\' https://{self.config.domain} wss://{self.config.domain}',
- # 'script-src': f'\'self\' https://{self.config.domain}'
- # }
- #
- # return '; '.join(f'{key} {value}' for key, value in data.items()) + ';'
-
def push_message(self, inbox: str, message: Message, instance: Row) -> None:
self['push_queue'].put((inbox, message, instance))
@@ -305,6 +286,7 @@ async def handle_response_headers(request: web.Request, handler: Callable) -> Re
resp = await handler(request)
resp.headers['Server'] = 'ActivityRelay'
+ # Still have to figure out how csp headers work
# if resp.content_type == 'text/html':
# resp.headers['Content-Security-Policy'] = Application.DEFAULT.get_csp(request)
diff --git a/relay/frontend/page/admin-domain_bans.haml b/relay/frontend/page/admin-domain_bans.haml
index 104ce15..43636ae 100644
--- a/relay/frontend/page/admin-domain_bans.haml
+++ b/relay/frontend/page/admin-domain_bans.haml
@@ -2,7 +2,7 @@
-set page="Domain Bans"
-block head
- %script(type="application/javascript" src="/static/domain_ban.js" nonce="{{view.request['hash']}}", defer)
+ %script(type="application/javascript" src="/static/domain_ban.js" nonce="{{view.request['hash']}}")
-block content
%details.section
@@ -23,7 +23,7 @@
%legend << Domain Bans
.data-table
- %table#table
+ %table
%thead
%tr
%td.domain << Domain
@@ -38,11 +38,11 @@
%summary -> =ban.domain
.grid-2col
- .reason << Reason
- %textarea.reason(id="{{ban.domain}}-reason" name="reason") << {{ban.reason or ""}}
+ %label.reason(for="{{ban.domain}}-reason") << Reason
+ %textarea.reason(id="{{ban.domain}}-reason") << {{ban.reason or ""}}
- .note << Note
- %textarea.note(id="{{ban.domain}}-note" name="note") << {{ban.note or ""}}
+ %label.note(for="{{ban.domain}}-note") << Note
+ %textarea.note(id="{{ban.domain}}-note") << {{ban.note or ""}}
%input(type="button" value="Update" onclick="update_ban('{{ban.domain}}')")
@@ -50,4 +50,4 @@
=ban.created.strftime("%Y-%m-%d")
%td.remove
- %a(href="#", onclick="unban('{{ban.domain}}')" title="Unban domain") << ✖
+ %a(href="#" onclick="unban('{{ban.domain}}')" title="Unban domain") << ✖
diff --git a/relay/frontend/page/admin-software_bans.haml b/relay/frontend/page/admin-software_bans.haml
index 1ce5664..cf1576c 100644
--- a/relay/frontend/page/admin-software_bans.haml
+++ b/relay/frontend/page/admin-software_bans.haml
@@ -1,5 +1,9 @@
-extends "base.haml"
-set page="Software Bans"
+
+-block head
+ %script(type="application/javascript" src="/static/software_ban.js" nonce="{{view.request['hash']}}")
+
-block content
%details.section
%summary << Ban Software
diff --git a/relay/frontend/static/domain_ban.js b/relay/frontend/static/domain_ban.js
index 82434af..b7ae6b6 100644
--- a/relay/frontend/static/domain_ban.js
+++ b/relay/frontend/static/domain_ban.js
@@ -3,9 +3,9 @@ function create_ban_object(domain, reason, note) {
text += `