in newswires/app/controllers/ViteController.scala [87:106]
def item(id: String): Action[AnyContent] = index
def index: Action[AnyContent] = addToken(
authAction.async { implicit request =>
if (mode == Mode.Dev) {
proxyAsset("index.html", request)
} else {
Future {
val assetPath =
assetsFinder.assetsBasePath.stripPrefix(
"/"
) + assetsFinder.unprefixed.path(
"index.html"
)
val indexHtml = Source.fromResource(assetPath).mkString
val withClientConfig = injectClientCodeIntoPageBody(indexHtml)
Ok(withClientConfig).as(HTML)
}
}
}