Add favicon assets and gallery.fukun.net nginx config
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
@@ -0,0 +1,36 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200" width="200" height="200">
|
||||
<defs>
|
||||
<filter id="xuan" x="-10%" y="-10%" width="120%" height="120%">
|
||||
<feTurbulence type="fractalNoise" baseFrequency="0.04" numOctaves="6" seed="2" result="noise"/>
|
||||
<feDisplacementMap in="SourceGraphic" in2="noise" scale="3.5" xChannelSelector="R" yChannelSelector="G" result="rough"/>
|
||||
<feGaussianBlur in="rough" stdDeviation="0.3" result="blur"/>
|
||||
<feComponentTransfer in="blur">
|
||||
<feFuncA type="linear" slope="1.2"/>
|
||||
</feComponentTransfer>
|
||||
</filter>
|
||||
</defs>
|
||||
|
||||
<rect x="4" y="4" width="192" height="192" rx="44" ry="44" fill="#000"/>
|
||||
|
||||
<g filter="url(#xuan)">
|
||||
<path d="M 60 22 C 56 60, 57 100, 56 178" fill="none" stroke="#f8f8f8" stroke-width="13" stroke-linecap="round"/>
|
||||
<path d="M 60 22 C 56 60, 57 100, 56 178" fill="none" stroke="#fff" stroke-width="8" stroke-linecap="round" opacity="0.7"/>
|
||||
<path d="M 56 28 C 72 24, 100 24, 118 30" fill="none" stroke="#f8f8f8" stroke-width="12" stroke-linecap="round"/>
|
||||
<path d="M 56 28 C 72 24, 100 24, 118 30" fill="none" stroke="#fff" stroke-width="7" stroke-linecap="round" opacity="0.6"/>
|
||||
<path d="M 57 94 C 70 90, 90 90, 100 96" fill="none" stroke="#f8f8f8" stroke-width="10" stroke-linecap="round"/>
|
||||
<path d="M 57 94 C 70 90, 90 90, 100 96" fill="none" stroke="#fff" stroke-width="5" stroke-linecap="round" opacity="0.5"/>
|
||||
<path d="M 60 22 C 58 30, 61 38, 59 44" fill="none" stroke="#fff" stroke-width="2" opacity="0.3"/>
|
||||
<path d="M 64 26 C 62 34, 65 40, 63 46" fill="none" stroke="#fff" stroke-width="1.5" opacity="0.2"/>
|
||||
</g>
|
||||
|
||||
<g filter="url(#xuan)">
|
||||
<path d="M 120 22 C 117 60, 118 100, 117 178" fill="none" stroke="#f8f8f8" stroke-width="13" stroke-linecap="round"/>
|
||||
<path d="M 120 22 C 117 60, 118 100, 117 178" fill="none" stroke="#fff" stroke-width="8" stroke-linecap="round" opacity="0.7"/>
|
||||
<path d="M 170 24 C 160 32, 140 56, 118 96" fill="none" stroke="#f8f8f8" stroke-width="11" stroke-linecap="round"/>
|
||||
<path d="M 170 24 C 160 32, 140 56, 118 96" fill="none" stroke="#fff" stroke-width="6" stroke-linecap="round" opacity="0.6"/>
|
||||
<path d="M 117 100 C 130 120, 148 144, 168 176" fill="none" stroke="#f8f8f8" stroke-width="11" stroke-linecap="round"/>
|
||||
<path d="M 117 100 C 130 120, 148 144, 168 176" fill="none" stroke="#fff" stroke-width="6" stroke-linecap="round" opacity="0.6"/>
|
||||
<path d="M 168 28 C 158 38, 142 58, 122 90" fill="none" stroke="#fff" stroke-width="2" opacity="0.25"/>
|
||||
<path d="M 120 104 C 132 120, 146 140, 162 168" fill="none" stroke="#fff" stroke-width="2" opacity="0.25"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.6 KiB |
@@ -0,0 +1,55 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name gallery.fukun.net cdn.fukun.net;
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
server_name gallery.fukun.net cdn.fukun.net;
|
||||
|
||||
ssl_certificate /etc/nginx/ssl/gallery.fukun.net_bundle.crt;
|
||||
ssl_certificate_key /etc/nginx/ssl/gallery.fukun.net.key;
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
ssl_ciphers HIGH:!aNULL:!MD5;
|
||||
# 劫持 Photoview 图标,统一用 fukun.net 的 favicon
|
||||
location = /photoview-logo.svg { root /home/hugo/hugo-blog/public; try_files /favicon.svg =404; }
|
||||
location = /logo192.png { root /home/hugo/hugo-blog/public; try_files /favicon-32x32.png =404; }
|
||||
location = /logo512.png { root /home/hugo/hugo-blog/public; try_files /favicon-32x32.png =404; }
|
||||
location = /manifest.json { root /home/hugo/hugo-blog/public; try_files /site.webmanifest =404; }
|
||||
# favicon 统一走 fukun.net
|
||||
location = /favicon.ico { root /home/hugo/hugo-blog/public; }
|
||||
location = /favicon.png { root /home/hugo/hugo-blog/public; }
|
||||
location = /favicon.svg { root /home/hugo/hugo-blog/public; }
|
||||
location = /images/favicon.svg { root /home/hugo/hugo-blog/public; }
|
||||
location = /favicon-16x16.png { root /home/hugo/hugo-blog/public; }
|
||||
location = /favicon-32x32.png { root /home/hugo/hugo-blog/public; }
|
||||
location = /apple-touch-icon.png { root /home/hugo/hugo-blog/public; }
|
||||
location = /site.webmanifest { root /home/hugo/hugo-blog/public; }
|
||||
|
||||
client_max_body_size 4G;
|
||||
|
||||
# CORS — 允许 gallery.fukun.net 跨域请求(CDN 回源需要)
|
||||
add_header Access-Control-Allow-Origin "https://gallery.fukun.net" always;
|
||||
add_header Access-Control-Allow-Methods "GET, OPTIONS" always;
|
||||
add_header Access-Control-Allow-Headers "*" always;
|
||||
add_header Access-Control-Allow-Credentials "true" always;
|
||||
|
||||
location /photos/ {
|
||||
alias /home/gallery/photos/;
|
||||
add_header Access-Control-Allow-Origin "*" always;
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:8000;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_read_timeout 86400s;
|
||||
proxy_send_timeout 86400s;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user