Skip to content

Commit

Permalink
Merge pull request #186 from bcgov/yj
Browse files Browse the repository at this point in the history
chore: app base url
  • Loading branch information
ychung-mot authored Apr 18, 2024
2 parents d7bcacf + a59e281 commit f7d16b2
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion helm/main/values-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ global:
'Logging__LogLevel__StrDss.Common.StrDssLogger': 'Information'
'ASPNETCORE_ENVIRONMENT': 'Development'
'ENV_NAME': 'dev'
'AppBaseUrl': 'https://dev-strdata.apps.silver.devops.gov.bc.ca'
'APP_BASE_URL': 'https://dev.strdata.gov.bc.ca'
'SSO_CLIENT': 'str-dss-5303'
'SSO_HOST': 'https://dev.loginproxy.gov.bc.ca/auth'
'SSO_REALM': 'standard'
Expand Down
2 changes: 1 addition & 1 deletion helm/main/values-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ global:
'Logging__LogLevel__StrDss.Common.StrDssLogger': 'Information'
'ASPNETCORE_ENVIRONMENT': 'Production'
'ENV_NAME': 'prod'
'AppBaseUrl': 'https://prod-strdata.apps.silver.devops.gov.bc.ca'
'APP_BASE_URL': 'https://strdata.gov.bc.ca'
'SSO_CLIENT': 'str-dss-5303'
'SSO_HOST': 'https://loginproxy.gov.bc.ca/auth'
'SSO_REALM': 'standard'
Expand Down
2 changes: 1 addition & 1 deletion helm/main/values-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ global:
'Logging__LogLevel__StrDss.Common.StrDssLogger': 'Information'
'ASPNETCORE_ENVIRONMENT': 'Test'
'ENV_NAME': 'test'
'AppBaseUrl': 'https://test-strdata.apps.silver.devops.gov.bc.ca'
'APP_BASE_URL': 'https://test.strdata.gov.bc.ca'
'SSO_CLIENT': 'str-dss-5303'
'SSO_HOST': 'https://dev.loginproxy.gov.bc.ca/auth'
'SSO_REALM': 'standard'
Expand Down
2 changes: 1 addition & 1 deletion helm/main/values-uat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ global:
'Logging__LogLevel__StrDss.Common.StrDssLogger': 'Information'
'ASPNETCORE_ENVIRONMENT': 'Staging'
'ENV_NAME': 'uat'
'AppBaseUrl': 'https://uat-strdata.apps.silver.devops.gov.bc.ca'
'APP_BASE_URL': 'https://uat.strdata.gov.bc.ca'
'SSO_CLIENT': 'str-dss-5303'
'SSO_HOST': 'https://dev.loginproxy.gov.bc.ca/auth'
'SSO_REALM': 'standard'
Expand Down
3 changes: 1 addition & 2 deletions server/StrDss.Service/ServiceBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ public ServiceBase(ICurrentUser currentUser, IFieldValidatorService validator, I

protected string GetHostUrl()
{
var request = _httpContextAccessor?.HttpContext?.Request;
return $"{request?.Scheme}://{request?.Host}";
return Environment.GetEnvironmentVariable("APP_BASE_URL") ?? "";
}
}
}

0 comments on commit f7d16b2

Please sign in to comment.