We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ff71608 commit c0b7034Copy full SHA for c0b7034
1 file changed
public/uv/sw.js
@@ -81,7 +81,15 @@ self.addEventListener('fetch', (event) => {
81
blacklist[domainTld] instanceof RegExp &&
82
blacklist[domainTld].test(domain.slice(0, -domainTld.length))
83
) {
84
- return new Response(new Blob(), { status: 406 });
+ return new Response(`
85
+ <html><body style="margin:0;display:flex;justify-content:center;align-items:center;height:100vh;background:#000;color:#fff;font-family:sans-serif;flex-direction:column;">
86
+ <h1 style="font-size:3em;margin:0.2em 0;">Blocked</h1>
87
+ <p style="font-size:1.2em;">Access to this domain is restricted.</p>
88
+ </body></html>
89
+ `, {
90
+ status: 406,
91
+ headers: { 'Content-Type': 'text/html' }
92
+ });
93
}
94
95
const domainLower = domain.toLowerCase();
0 commit comments