Skip to content
This repository was archived by the owner on Nov 21, 2023. It is now read-only.

Commit 5356c4a

Browse files
committed
fix(workers): change original static page serving from html to plain text
1 parent c0b7bdf commit 5356c4a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/workers/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ async function handleRequest(request) {
154154

155155
console.log(path)
156156
if (!path) {
157-
const html = await fetch('https://static.fuki.cc/' + config.themes + '/index.html')
157+
const html = await fetch('https://cdn.jsdelivr.net/gh/toshikidev/fuki@gh-pages/' + config.themes + '/index.html')
158158

159159
return new Response(await html.text(), {
160160
headers: {
@@ -176,7 +176,7 @@ async function handleRequest(request) {
176176
if (location) {
177177
if (config.safe_browsing_api_key) {
178178
if (!(await is_url_safe(location))) {
179-
let warning_page = await fetch('https://static.fuki.cc/safe-browsing.html')
179+
let warning_page = await fetch('https://cdn.jsdelivr.net/gh/toshikidev/fuki@gh-pages/safe-browsing.html')
180180
warning_page = await warning_page.text()
181181
warning_page = warning_page.replace(/{Replace}/gm, location)
182182
return new Response(warning_page, {
@@ -187,7 +187,7 @@ async function handleRequest(request) {
187187
}
188188
}
189189
if (config.no_ref == 'on') {
190-
let no_ref = await fetch('https://static.fuki.cc/no-ref.html')
190+
let no_ref = await fetch('https://cdn.jsdelivr.net/gh/toshikidev/fuki@gh-pages/no-ref.html')
191191
no_ref = await no_ref.text()
192192
no_ref = no_ref.replace(/{Replace}/gm, location)
193193
return new Response(no_ref, {

0 commit comments

Comments
 (0)