feat: 资源部署
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
# pipi-assets 本地测试(端口 8081,避免与 80 端口其他站点冲突)
|
||||
# 使用方式见同目录下的 NGINX-本地测试说明.md
|
||||
|
||||
server {
|
||||
listen 8081;
|
||||
server_name localhost;
|
||||
|
||||
root /Users/joey-xd/sites/pipi-learn/platform-pipi/packages/voice-production/pipi-assets;
|
||||
autoindex off;
|
||||
|
||||
location /voice/ {
|
||||
alias /Users/joey-xd/sites/pipi-learn/platform-pipi/packages/voice-production/pipi-assets/voice/;
|
||||
add_header Cache-Control "public, max-age=86400";
|
||||
}
|
||||
location /char/ {
|
||||
alias /Users/joey-xd/sites/pipi-learn/platform-pipi/packages/voice-production/pipi-assets/char/;
|
||||
add_header Cache-Control "public, max-age=3600";
|
||||
add_header Access-Control-Allow-Origin "*";
|
||||
}
|
||||
location /image/ {
|
||||
alias /Users/joey-xd/sites/pipi-learn/platform-pipi/packages/voice-production/pipi-assets/image/;
|
||||
add_header Cache-Control "public, max-age=86400";
|
||||
}
|
||||
|
||||
location /health {
|
||||
return 200 "ok";
|
||||
add_header Content-Type text/plain;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user