Skip to content

Commit

Permalink
feat: nginx 파일 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
GaBaljaintheroom committed Oct 4, 2023
1 parent d5a84e8 commit 6e3b56b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nginx/dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ FROM nginx:latest
# Delete nginx default configuration file in virtual directory
# 가상 공간의 nginx 기본 설정파일 삭제 후 작성한 설정파일로 대체
RUN rm /etc/nginx/conf.d/default.conf
COPY nginx.conf /etc/nginx/conf.d
COPY nginx.conf /etc/nginx/conf.d

CMD ["nginx", "-g", "daemo리n off;"]
14 changes: 14 additions & 0 deletions nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,19 @@ http {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_redirect off;
}

location ~* (service-worker\.js)$ {
default_type application/octet-stream;
include /etc/nginx/mime.types;
add_header 'Cache-Control' 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
expires off;
proxy_no_cache 1;
}
location / {
default_type application/octet-stream;
include /etc/nginx/mime.types;
root /var/www/frontend;
try_files $uri $uri/ /index.html?q=$uri&$args;
}
}
}

0 comments on commit 6e3b56b

Please sign in to comment.