Skip to content

Commit 24a093f

Browse files
committed
fix: remove inline script and onclick handler to comply with default-src 'self' CSP
1 parent 424b7c6 commit 24a093f

1 file changed

Lines changed: 5 additions & 16 deletions

File tree

public/404.html

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@
143143

144144
<div class="line">
145145
<span class="prompt">$</span>
146-
<span>GET <span id="req-path" class="path-val">/</span></span>
146+
<span>GET <span class="path-val"></span></span>
147147
</div>
148148

149149
<div class="line spacer">
@@ -157,14 +157,14 @@
157157
<span class="key">status</span>
158158
<span class="val err">404 Not Found</span>
159159
</div>
160-
<div class="kv">
161-
<span class="key">path</span>
162-
<span class="val path-val" id="err-path">/</span>
163-
</div>
164160
<div class="kv">
165161
<span class="key">hint</span>
166162
<span class="val dim">the file does not exist or was moved</span>
167163
</div>
164+
<div class="kv">
165+
<span class="key">tip</span>
166+
<span class="val dim">double-check the URL for typos</span>
167+
</div>
168168
</div>
169169

170170
<div class="actions">
@@ -174,12 +174,6 @@
174174
</svg>
175175
~/
176176
</a>
177-
<button class="btn" onclick="history.back()">
178-
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
179-
<polyline points="15 18 9 12 15 6"/>
180-
</svg>
181-
go back
182-
</button>
183177
</div>
184178

185179
<hr class="section-divider" />
@@ -189,11 +183,6 @@
189183
&mdash; <a class="plain" href="https://21no.de">BackendStack21</a>
190184
</div>
191185

192-
<script>
193-
var p = window.location.pathname;
194-
document.getElementById('req-path').textContent = p;
195-
document.getElementById('err-path').textContent = p;
196-
</script>
197186

198187
</body>
199188
</html>

0 commit comments

Comments
 (0)