Skip to content

Commit

Permalink
add file serving via nginx
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickwieth committed May 21, 2024
1 parent ae1a824 commit 507728c
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
12 changes: 11 additions & 1 deletion config/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ server {
# Not sending ACAO header because it is already being added by the upstream
#add_header 'Access-Control-Allow-Origin' '*' always;
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-Headers' '*' always;
add_header 'Access-Control-Max-Age' 1728000 always;

if ($request_method = 'OPTIONS') {
Expand All @@ -110,4 +110,14 @@ server {
proxy_set_header X-forward-for $proxy_add_x_forwarded_for;
proxy_pass http://blockchain:4500$1$is_args$args;
}

location /files/ {
add_header 'Access-Control-Allow-Origin' '*' always;
add_header 'Access-Control-Allow-Credentials' 'true' always;
add_header 'Access-Control-Allow-Methods' '*' always;
add_header 'Access-Control-Allow-Headers' '*' always;
add_header 'Access-Control-Max-Age' 1728000 always;

root /;
}
}
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ services:
- /etc/letsencrypt/live/cardchain.crowdcontrol.network/privkey.pem:/etc/letsencrypt/live/cardchain.crowdcontrol.network/privkey.pem
- ./config/nginx.conf:/etc/nginx/conf.d/default.conf
- /etc/nginx/ssl/dhparam-4096.pem:/etc/nginx/ssl/dhparam-4096.pem
- ./files/:/files/
ports:
- 80:80
- 81:81
Expand Down
12 changes: 12 additions & 0 deletions scripts/paramchange.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"title": "Param change commonsPerPack: 4",
"description": "We want to change the commonsPerPack",
"changes": [
{
"subspace": "cardchain",
"key": "CommonsPerPack",
"value": "4"
}
],
"deposit": "10000000ubpf"
}

0 comments on commit 507728c

Please sign in to comment.