Skip to content

Commit

Permalink
Add facia baseURL to config and use in DCR service (#26858)
Browse files Browse the repository at this point in the history
  • Loading branch information
cemms1 authored Jan 31, 2024
1 parent c61f264 commit b7d32b1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions common/app/common/configuration.scala
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ class GuardianConfiguration extends GuLogging {
object rendering {
lazy val baseURL = configuration.getMandatoryStringProperty("rendering.baseURL")
lazy val articleBaseURL = configuration.getMandatoryStringProperty("article-rendering.baseURL")
lazy val faciaBaseURL = configuration.getMandatoryStringProperty("facia-rendering.baseURL")
lazy val sentryHost = configuration.getMandatoryStringProperty("rendering.sentryHost")
lazy val sentryPublicApiKey = configuration.getMandatoryStringProperty("rendering.sentryPublicApiKey")
lazy val timeout = 2.seconds
Expand Down
4 changes: 2 additions & 2 deletions common/app/renderers/DotcomRenderingService.scala
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ class DotcomRenderingService extends GuLogging with ResultWithPreconnectPreload
)

val json = DotcomFrontsRenderingDataModel.toJson(dataModel)
post(ws, json, Configuration.rendering.baseURL + "/Front", CacheTime.Facia)
post(ws, json, Configuration.rendering.faciaBaseURL + "/Front", CacheTime.Facia)
}

def getTagFront(
Expand All @@ -292,7 +292,7 @@ class DotcomRenderingService extends GuLogging with ResultWithPreconnectPreload
)

val json = DotcomTagFrontsRenderingDataModel.toJson(dataModel)
post(ws, json, Configuration.rendering.baseURL + "/TagFront", CacheTime.Facia)
post(ws, json, Configuration.rendering.faciaBaseURL + "/TagFront", CacheTime.Facia)
}

def getInteractive(
Expand Down
4 changes: 4 additions & 0 deletions common/conf/env/DEVINFRA.properties
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ pa.rugby.api.key=none
# DCR
rendering.endpoint=http://localhost:3030
rendering.baseURL=http://localhost:3030
article-rendering.baseURL=http://localhost:3030
facia-rendering.baseURL=http://localhost:3030
interactive-rendering.baseURL=http://localhost:3030
misc-rendering.baseURL=http://localhost:3030

# contributions
contributionsService.url=https://contributions.code.dev-guardianapis.com

0 comments on commit b7d32b1

Please sign in to comment.