Skip to content

Commit

Permalink
Fixed routing error in nginx
Browse files Browse the repository at this point in the history
  • Loading branch information
singhalkarun committed Oct 11, 2023
1 parent f490ef8 commit 8f38332
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ for ((i=0; i<$count; i++)); do
environment=($(jq -r ".models[$i].environment | keys[]" config.json))

# Add location block to Nginx configuration
printf " location ${apiBasePath} {\n proxy_pass http://${serviceName};\n " >> "${DOMAIN_NAME}.conf"
printf " location ${apiBasePath} {\n proxy_pass http://${serviceName}/;\n " >> "${DOMAIN_NAME}.conf"

for ((j=0; j<$countNginx; j++)); do
configLine=$(jq -r ".models[$i].nginx[$j]" config.json)
Expand Down Expand Up @@ -106,7 +106,7 @@ if [ "${USE_HTTPS}" = "true" ]; then
exposedPort=$((8000 + i))

# Add location block to Nginx configuration
printf " location ${apiBasePath}/ {\n proxy_pass http://${serviceName};\n }\n" >> "${DOMAIN_NAME}.conf"
printf " location ${apiBasePath}/ {\n proxy_pass http://${serviceName}/;\n }\n" >> "${DOMAIN_NAME}.conf"
done

printf " }\n" >> "${DOMAIN_NAME}.conf"
Expand Down

0 comments on commit 8f38332

Please sign in to comment.