diff --git a/app/uk/gov/hmrc/apidocumentation/config/ApplicationConfig.scala b/app/uk/gov/hmrc/apidocumentation/config/ApplicationConfig.scala index 8e5dbb61..0e09a252 100644 --- a/app/uk/gov/hmrc/apidocumentation/config/ApplicationConfig.scala +++ b/app/uk/gov/hmrc/apidocumentation/config/ApplicationConfig.scala @@ -29,6 +29,7 @@ trait ApplicationConfig { def thirdPartyDeveloperUrl: String def apiPlatformMicroserviceBaseUrl: String def ramlPreviewMicroserviceBaseUrl: String + def apiDocumentationBaseUrl: String def securedCookie: Boolean def ramlPreviewEnabled: Boolean @@ -79,6 +80,8 @@ class ApplicationConfigImpl @Inject() (config: Configuration) lazy val apiPlatformMicroserviceBaseUrl = baseUrl("api-platform-microservice") lazy val ramlPreviewMicroserviceBaseUrl = baseUrl("raml-preview-microservice") + lazy val apiDocumentationBaseUrl = getString("apidocumentation.base.url") + val securedCookie = getBoolean("cookie.secure") val ramlPreviewEnabled = getBoolean("features.ramlPreview") val openApiPreviewEnabled = getBoolean("features.openApiPreview") diff --git a/app/uk/gov/hmrc/apidocumentation/controllers/OpenApiDocumentationController.scala b/app/uk/gov/hmrc/apidocumentation/controllers/OpenApiDocumentationController.scala index ad3aef33..65880043 100644 --- a/app/uk/gov/hmrc/apidocumentation/controllers/OpenApiDocumentationController.scala +++ b/app/uk/gov/hmrc/apidocumentation/controllers/OpenApiDocumentationController.scala @@ -138,7 +138,7 @@ class OpenApiDocumentationController @Inject() ( val emptyAuthList = java.util.Collections.emptyList[io.swagger.v3.parser.core.models.AuthorizationValue]() - val oasFileLocation = routes.OpenApiDocumentationController.fetchOas(service, version).absoluteURL() + val oasFileLocation = s"${appConfig.apiDocumentationBaseUrl}${routes.OpenApiDocumentationController.fetchOas(service, version).url}" val futureParsing = Future { blocking {