26 lines
782 B
JavaScript
26 lines
782 B
JavaScript
import { d as defineEventHandler, g as getRequestHeader, a as getCachedConfig, b as sendRedirect } from '../nitro/nitro.mjs';
|
|
import 'node:http';
|
|
import 'node:https';
|
|
import 'node:events';
|
|
import 'node:buffer';
|
|
import 'node:fs';
|
|
import 'node:path';
|
|
import 'node:crypto';
|
|
import 'vue';
|
|
import 'node:url';
|
|
import 'consola';
|
|
import 'fast-xml-parser';
|
|
import 'ipx';
|
|
|
|
const handler = defineEventHandler(async (event) => {
|
|
const host = getRequestHeader(event, "host");
|
|
const config = await getCachedConfig(host || "");
|
|
if (config == null ? void 0 : config.storageLogo) {
|
|
const remoteUrl = `${config.storageLogo}/favicon.ico`;
|
|
return sendRedirect(event, remoteUrl, 302);
|
|
}
|
|
return sendRedirect(event, "https://node.newinsta.ir/", 302);
|
|
});
|
|
|
|
export { handler as default };
|