Skip to content

Commit

Permalink
changed https to http for internal routing to clamav-nginx server
Browse files Browse the repository at this point in the history
  • Loading branch information
George Hudson committed Oct 11, 2023
2 parents 6193455 + 1638950 commit 92727a2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/Technical-Documentation/clamav.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ To route the clamav traffic to clamav in prod, each space needs to have one inst
In order to deploy the nginx router instance, change your directory to `tdrs-backend/clamav-router/` and run the following command while logged into the target space:


>`cf push tdp-clamav-nginx-${cf-space} -f manifest.yml --no-route`
>`cf push tdp-clamav-nginx-${cf-shortened-space} -f manifest.yml --no-route`
, where _nginx_instance_name_ can be : _tdp-clamav-nginx_.
, where _cf-shortened-space_ can be : _dev_, _staging_, or _prod_.

The instance name then will be set as an environment variable to redirect each instance traffic. This will deploy the nginx instance to the target environment.

Expand Down
5 changes: 2 additions & 3 deletions scripts/deploy-backend.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ set_cf_envs()
"AMS_CLIENT_ID"
"AMS_CLIENT_SECRET"
"AMS_CONFIGURATION_ENDPOINT"
"AV_SCAN_URL"
"BASE_URL"
"CLAMAV_NEEDED"
"CYPRESS_TOKEN"
Expand Down Expand Up @@ -106,7 +105,7 @@ update_backend()

# Add network policy to allow frontend to access backend
cf add-network-policy "$CGAPPNAME_FRONTEND" "$CGAPPNAME_BACKEND" --protocol tcp --port 8080

cf unset-env "$CGAPPNAME_BACKEND" "AV_SCAN_URL"
if ["$CF_SPACE" = "tanf-prod" ]; then
# Add network policy to allow backend to access tanf-prod services
cf add-network-policy "$CGAPPNAME_BACKEND" clamav-rest --protocol tcp --port 9000
Expand All @@ -115,7 +114,7 @@ update_backend()
cf add-network-policy "$CGAPPNAME_BACKEND" tdp-clamav-nginx-$env --protocol tcp --port 9000

# Add environment varilables for clamav
cf set-env "$CGAPPNAME_BACKEND" AV_SCAN_URL "https://tdp-clamav-nginx-$env.apps.internal:9000/scan"
cf set-env "$CGAPPNAME_BACKEND" AV_SCAN_URL "http://tdp-clamav-nginx-$env.apps.internal:9000/scan"
fi

cd ..
Expand Down

0 comments on commit 92727a2

Please sign in to comment.