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

Commit 8f68916

Browse files
authored
fix(config): update theme variable to themes for fetching theme page as a regard to dir name
1 parent 4fda71f commit 8f68916

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/workers/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const config = {
22
no_ref: 'off', // control the HTTP referrer header, if you want to create an anonymous link that will hide the HTTP Referer header, please set to "on"
3-
theme: '', // homepage theme, use the empty value for default theme. To use urlcool theme, please fill with "theme/urlcool"
3+
themes: '', // homepage themes, use the empty value for default themes. To use urlcool themes, please fill with "themes/urlcool"
44
cors: 'on', // allow Cross-origin resource sharing for API requests
55
unique_link: true, // if it is true, the same long url will be shorten into the same short url
66
custom_link: false, // allow users to customize the short url.
@@ -154,7 +154,7 @@ async function handleRequest(request) {
154154

155155
console.log(path)
156156
if (!path) {
157-
const html = await fetch('https://xytom.github.io/Url-Shorten-Worker/' + config.theme + '/index.html')
157+
const html = await fetch('https://xytom.github.io/Url-Shorten-Worker/' + config.themes + '/index.html')
158158

159159
return new Response(await html.text(), {
160160
headers: {

0 commit comments

Comments
 (0)