Skip to content

Commit

Permalink
# adjust nginx
Browse files Browse the repository at this point in the history
  • Loading branch information
czy21 committed Dec 24, 2024
1 parent 477f6c8 commit 2242fca
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
13 changes: 7 additions & 6 deletions server/docker/app/nginx/node/base/conf/conf.d/openwrt.conf
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@ server {

ssl_certificate /etc/nginx/cert/czy21.com.pem;
ssl_certificate_key /etc/nginx/cert/czy21.com.key;

add_header Access-Control-Allow-Origin *;

add_header 'Access-Control-Allow-Credentials' 'true' always;
add_header 'Access-Control-Allow-Headers' * always;
add_header 'Access-Control-Allow-Methods' * always;
add_header 'Access-Control-Allow-Origin' 'https://openwrt-firmware.czy21.com' always;

location / {
proxy_pass http://192.168.2.18:8081;
Expand All @@ -38,17 +41,15 @@ server {
ssl_certificate_key /etc/nginx/cert/czy21.com.key;

add_header 'Access-Control-Allow-Credentials' 'true' always;
add_header 'Access-Control-Allow-Origin' 'https://openwrt-firmware.czy21.com' always;
add_header 'Access-Control-Allow-Methods' * always;
add_header 'Access-Control-Allow-Headers' * always;
add_header 'Access-Control-Allow-Methods' * always;
add_header 'Access-Control-Allow-Origin' 'https://openwrt-firmware.czy21.com' always;

if ($request_method = 'OPTIONS') {
return 204;
}


location / {

proxy_pass http://192.168.2.12:8000;
}

Expand Down
2 changes: 1 addition & 1 deletion server/prod/nginx/conf/conf.d/home.conf
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ server {
server {
http2 on;
listen 443 ssl;
server_name openwrt-download.czy21.com openwrt-firmware.czy21.com openwrt-asu.czy21.com;
server_name openwrt-download.czy21.com openwrt-firmware.czy21.com;

include /etc/nginx/conf.d/czy21-ssl.conf;

Expand Down

0 comments on commit 2242fca

Please sign in to comment.