mirror of
https://github.com/ourongxing/newsnow.git
synced 2025-01-18 18:59:15 +08:00
fix: reloading of sites deployed with Docker or Node.js
This commit is contained in:
parent
8263dbff71
commit
e2d0152e5f
@ -3,6 +3,7 @@ import { jwtVerify } from "jose"
|
||||
|
||||
export default defineEventHandler(async (event) => {
|
||||
const url = getRequestURL(event)
|
||||
if (!url.pathname.startsWith("/api")) return
|
||||
if (["JWT_SECRET", "G_CLIENT_ID", "G_CLIENT_SECRET"].find(k => !process.env[k])) {
|
||||
event.context.disabledLogin = true
|
||||
if (["/api/s", "/api/proxy"].every(p => !url.pathname.startsWith(p)))
|
||||
|
Loading…
x
Reference in New Issue
Block a user