Skip to content

Commit

Permalink
Merge pull request #131 from maticnetwork/DEVOPS-2599-cors-issue-update
Browse files Browse the repository at this point in the history
Add nginx.conf file for handling cors
  • Loading branch information
sshrihar authored Apr 4, 2024
2 parents 09526af + 7a2bee6 commit 100645f
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
FROM nginx:alpine

COPY nginx.conf /etc/nginx/nginx.conf

WORKDIR /usr/share/nginx/html
COPY . .
RUN rm -rf .git*

EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
CMD ["nginx", "-g", "daemon off;"]
27 changes: 27 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# nginx.conf

user nginx;
worker_processes 1;

events {
worker_connections 1024;
}

http {
include /etc/nginx/mime.types;
default_type application/octet-stream;

sendfile on;
keepalive_timeout 65;

server {
listen 80;
server_name localhost;

location / {
root /usr/share/nginx/html;
index index.html index.htm;
add_header Access-Control-Allow-Origin *;
}
}
}

0 comments on commit 100645f

Please sign in to comment.