mirror of
https://github.com/rikkaneko/paste.git
synced 2025-08-07 14:35:34 +01:00
Update service endpoint
Update project dependencies Signed-off-by: Joe Ma <rikkaneko23@gmail.com>
This commit is contained in:
parent
174885af7c
commit
50244f0c1e
7 changed files with 195 additions and 195 deletions
|
@ -22,7 +22,7 @@ import {sha256} from 'js-sha256';
|
|||
import dedent from 'dedent-js';
|
||||
|
||||
// Constants
|
||||
const SERVICE_URL = 'pb.nekoul.com';
|
||||
const SERVICE_URL = 'pb.nekoid.cc';
|
||||
const PASTE_WEB_URL_v1 = 'https://raw.githubusercontent.com/rikkaneko/paste/main/web/v1';
|
||||
const PASTE_WEB_URL = 'https://raw.githubusercontent.com/rikkaneko/paste/main/web/v2';
|
||||
const UUID_LENGTH = 4;
|
||||
|
@ -476,7 +476,7 @@ async function get_paste_info(uuid: string, descriptor: PasteIndexEntry, env: En
|
|||
const paste_info = {
|
||||
uuid,
|
||||
link,
|
||||
link_qr: 'https://qrcode.nekoul.com/?' + new URLSearchParams({q: link, type: 'svg'}),
|
||||
link_qr: 'https://qrcode.nekoid.cc/?' + new URLSearchParams({q: link, type: 'svg'}),
|
||||
type: descriptor.type ?? 'paste',
|
||||
title: descriptor.title?.trim(),
|
||||
mime_type: descriptor.mime_type,
|
||||
|
@ -542,7 +542,7 @@ async function get_paste_info(uuid: string, descriptor: PasteIndexEntry, env: En
|
|||
// Console response
|
||||
if (need_qr) {
|
||||
// Cloudflare currently does not support doing a subrequest to the same zone, use service binding instead
|
||||
const res = await env.QRCODE.fetch('https://qrcode.nekoul.com?' + new URLSearchParams({
|
||||
const res = await env.QRCODE.fetch('https://qrcode.nekoid.cc?' + new URLSearchParams({
|
||||
q: link,
|
||||
type: 'utf8',
|
||||
}));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue