mirror of
https://gitee.com/huanghongxun/HMCL-docs.git
synced 2026-11-30 16:08:26 +08:00
refactor: refactor to 11ty to support Tencent Cloud EdgeOne Maker
continuous-integration/drone/push Build is failing
continuous-integration/drone/push Build is failing
This commit is contained in:
+40
@@ -0,0 +1,40 @@
|
||||
worker_processes auto;
|
||||
pid /tmp/nginx.pid;
|
||||
error_log /dev/stderr warn;
|
||||
|
||||
events { worker_connections 512; }
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
access_log /dev/stdout;
|
||||
server_tokens off;
|
||||
sendfile on;
|
||||
keepalive_timeout 30;
|
||||
client_body_temp_path /tmp/client;
|
||||
proxy_temp_path /tmp/proxy;
|
||||
fastcgi_temp_path /tmp/fastcgi;
|
||||
uwsgi_temp_path /tmp/uwsgi;
|
||||
scgi_temp_path /tmp/scgi;
|
||||
|
||||
server {
|
||||
listen 8080;
|
||||
server_name _;
|
||||
root /srv/www;
|
||||
index index.html;
|
||||
absolute_redirect off;
|
||||
autoindex off;
|
||||
error_page 404 /404.html;
|
||||
add_header X-Content-Type-Options nosniff always;
|
||||
add_header Cache-Control "no-cache" always;
|
||||
location / { try_files $uri $uri/ =404; }
|
||||
# Preserve legacy generated-image URLs without storing converted images.
|
||||
location ~ ^/assets/.+\.(?:png|jpe?g|gif|tiff?)\.webp$ {
|
||||
try_files $uri @original_image;
|
||||
}
|
||||
location @original_image {
|
||||
rewrite ^(/assets/.+\.(?:png|jpe?g|gif|tiff?))\.webp$ $1 permanent;
|
||||
}
|
||||
location ~ /\. { deny all; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user