下载文件
GTAVC
要求PHP8.0-8.1
Nginx
伪静态
# 静态资源匹配(新增 modules/ 目录,覆盖所有前端资源:dist/、modules/、各类js/jpg/mp4等)
location ~* ^/(dist/|modules/|index\.js|GamepadEmulator\.js|cover\.jpg|game\.js|idbfs\.js|intro\.mp4|jsdos-cloud-sdk\.js) {
# 优先查找根目录,再自动映射到 dist/ 目录下(解决 /modules/xxx 对应 /dist/modules/xxx)
try_files $uri $uri/ /dist/$uri =404;
expires 1d;
add_header Cache-Control "public, max-age=86400";
}
# vcsky 本地游戏资源处理
location /vcsky/ {
try_files $uri $uri/ /index.php?$query_string;
}
# SPA 路由 fallback(转发未匹配请求到 index.php)
location / {
try_files $uri $uri/ /index.php?$query_string;
}
# Brotli 压缩文件支持
location ~* \.br$ {
if ($http_accept_encoding ~* "br") {
add_header Content-Encoding br;
add_header Content-Type "";
}
try_files $uri =404;
}
# 跨域头配置(确保WASM及游戏资源加载不被拦截)
add_header Cross-Origin-Opener-Policy "same-origin" always;
add_header Cross-Origin-Embedder-Policy "require-corp" always;