Files
pangolin/web/website/astro.config.mjs
T
wangjia a454c63c4e fix(website): 落定真实域名/邮箱/Telegram
- canonical 域名 → https://pangolin.yanmeiai.com(astro.config SITE_URL 默认值)
- 联系邮箱 support@/buy@pangolin.vpnpangolin@yanmeiai.com(可点 mailto)
- Telegram @PangolinVPN_bot → @pangolin_app(可点 https://t.me/pangolin_app)
邮件转发已在 CF 配好:pangolin@yanmeiai.comchenxin880812@gmail.com(目标已验证)。
未动(待 #24):shop 自助商店 URL、LINE handle(TG 群为私有,不放公开页)。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-05 19:19:58 +08:00

29 lines
1.1 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// @ts-check
import { defineConfig } from 'astro/config';
import react from '@astrojs/react';
// 纯静态站点 (SSG),零 SSR。
// `site` 仅用于生成绝对 URLsitemap / canonical),镜像部署时可被任意域名覆盖,
// 不影响「整站可秒级复制到任意备用域名」:产物为纯相对路径静态文件。
// 主站 canonical 域名。镜像构建务必用「同一个」SITE_URL,使 canonical 始终指向主站
// (避免镜像与主站 SEO 竞争),且主站/镜像产物 hash 完全一致(验收:内容一致性)。
const SITE_URL = process.env.SITE_URL || 'https://pangolin.yanmeiai.com';
export default defineConfig({
site: SITE_URL,
output: 'static',
trailingSlash: 'always',
build: {
// 内联样式/脚本会破坏严格 CSPscript-src/style-src 'self'),全部产出为独立资源文件。
inlineStylesheets: 'never',
assets: '_astro',
},
integrations: [react()],
vite: {
build: {
// 关闭 JS 内联,保证 script-src 'self' 严格 CSP 下可运行。
assetsInlineLimit: 0,
},
},
});