-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed nginx dependency from docker compose, added its configuration… (
#219) * Removed nginx dependency from docker compose, added its configuration to inji-web nginx Signed-off-by: Gurpreet41082 <[email protected]> * [INJIWEB-1213 Made consistent ports and reverted nginx headers changes] Signed-off-by: Gurpreet41082 <[email protected]> --------- Signed-off-by: Gurpreet41082 <[email protected]>
- Loading branch information
1 parent
78a6acc
commit 31b9be5
Showing
5 changed files
with
37 additions
and
54 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
This file was deleted.
Oops, something went wrong.
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,20 +1,44 @@ | ||
server { | ||
listen 3004; | ||
# Serve static files, if any | ||
# Default location for normal static files | ||
location / { | ||
root /usr/share/nginx/html; | ||
index index.html index.htm; | ||
try_files $uri $uri/ /index.html; | ||
} | ||
|
||
|
||
location /mimoto/ { | ||
proxy_pass http://192.168.2.186:8089/; | ||
# Serve files from /home/mosip with autoindex enabled | ||
location ~* \.json$ { | ||
root /home/mosip; | ||
autoindex on; | ||
} | ||
|
||
|
||
# Proxy API requests to mimoto-service | ||
location /v1/mimoto/ { | ||
proxy_pass http://mimoto-service:8099/v1/mimoto/; | ||
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; | ||
proxy_http_version 1.1; | ||
proxy_set_header Connection ""; | ||
|
||
# Add CORS headers | ||
add_header 'Access-Control-Allow-Origin' '*' always; | ||
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always; | ||
add_header 'Access-Control-Allow-Headers' 'Content-Type, Authorization, Cache-Control' always; | ||
|
||
# Handle OPTIONS requests (for pre-flight checks) | ||
if ($request_method = 'OPTIONS') { | ||
return 204; | ||
} | ||
} | ||
|
||
error_page 500 502 503 504 /50x.html; | ||
|
||
location = /50x.html { | ||
root /usr/share/nginx/html; | ||
root /usr/share/nginx/html; | ||
} | ||
} |