提交正式官网

This commit is contained in:
parkiss
2026-07-09 14:35:32 +08:00
parent 5efbd6760e
commit e09f0eccda
792 changed files with 91499 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
import { getRequestURL, type H3Event } from 'h3'
import { resolveSiteUrl } from '~/utils/seo'
/** 反向代理后读取真实域名(支持 umedglobal.cn / umedglobal.com.cn 等多域名) */
export const REQUEST_SITE_URL_OPTS = {
xForwardedHost: true,
xForwardedProto: true
} as const
export function getSiteUrlFromEvent(event: H3Event, fallback: string) {
return resolveSiteUrl(fallback, getRequestURL(event, REQUEST_SITE_URL_OPTS).origin)
}