Skip to content

Commit 0e3819b

Browse files
committed
feat: cors allow any origin
1 parent 012f608 commit 0e3819b

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ ENV PREFETCH_FOLDERS=true
125125

126126
ENV PREFETCH_FILES=false
127127

128+
ENV CORS_ALLOW_ANY_ORIGIN=true
129+
128130
EXPOSE 8080
129131

130132
CMD ["/init.sh"]

server/nginx/conf.d/default.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ server {
1717
$[if `process.env.EXPERIMENTAL_CACHE`]$
1818
fastcgi_cache cache;
1919
$[end]$
20+
$[if `process.env.CORS_ALLOW_ANY_ORIGIN == "true"`]$
21+
add_header Access-Control-Allow-Origin *;
22+
$[end]$
2023
fastcgi_pass 127.0.0.1:9000;
2124
fastcgi_param SCRIPT_FILENAME /var/www/html/index.php;
2225
}

0 commit comments

Comments
 (0)