-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hotfix :: 수정사항 최소화 , nginx의 설정 Eb에 맡김
- Loading branch information
1 parent
1f1b0b1
commit f42a431
Showing
2 changed files
with
34 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,34 @@ | ||
client_max_body_size 50M; | ||
# .platform/nginx/conf.d/proxy.conf | ||
files: | ||
"/etc/nginx/conf.d/proxy.conf": | ||
mode: "000755" | ||
owner: root | ||
group: root | ||
content: | | ||
client_max_body_size 50M; | ||
server { | ||
listen 80; | ||
server_name _; | ||
|
||
location / { | ||
if ($request_method = 'OPTIONS') { | ||
add_header 'Access-Control-Allow-Origin' '*'; | ||
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, PATCH, OPTIONS'; | ||
add_header 'Access-Control-Allow-Headers' '*'; | ||
add_header 'Access-Control-Allow-Credentials' 'true'; | ||
return 204; | ||
} | ||
|
||
add_header 'Access-Control-Allow-Origin' '*'; | ||
add_header 'Access-Control-Allow-Credentials' 'true'; | ||
|
||
proxy_pass http://localhost:5000; | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
} | ||
} | ||
container_commands: | ||
01_reload_nginx: | ||
command: "service nginx reload" |