mirror of
https://github.com/ourongxing/newsnow.git
synced 2025-01-18 18:59:15 +08:00
fix: image proxy
This commit is contained in:
parent
ed0277274f
commit
c5feeff89a
@ -1,7 +1,7 @@
|
||||
export default defineEventHandler(async (event) => {
|
||||
const { url: img, type = "encodeURIComponent" } = getQuery(event)
|
||||
if (img) {
|
||||
const url = type === "encodeURIComponent" ? encodeURIComponent(img as string) : decodeBase64URL(img as string)
|
||||
const url = type === "encodeURIComponent" ? decodeURIComponent(img as string) : decodeBase64URL(img as string)
|
||||
return sendProxy(event, url, {
|
||||
headers: {
|
||||
"Access-Control-Allow-Origin": "*",
|
||||
|
Loading…
x
Reference in New Issue
Block a user