fun proxy()

in engine/src/main/kotlin/io/kotless/gen/factory/azure/filescontent/LambdaDescription.kt [45:57]


    fun proxy(lambdaPath: String, dynamicRoute: Application.API.DynamicRoute, functionAppName: String): String {
        return """
            "${dynamicRoute.path}_route": {
                "matchCondition": {
                    "route": "${dynamicRoute.path}"
                },
                "requestOverrides": {
                    "backend.request.headers.x-original-path": "/${dynamicRoute.path}"
                },
                "backendUri": "https://${functionAppName}.azurewebsites.net/${lambdaPath}"
            }
        """.trimIndent().replace("\"", "\\\"").replace("\n", "")
    }