Skip to content

Commit

Permalink
Merge branch 'OK-735-ovara-build-and-deploy' into MERGE__OK-735__OK-756
Browse files Browse the repository at this point in the history
  • Loading branch information
heidilm committed Nov 29, 2024
2 parents 37bd371 + d06babc commit 06bcce9
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ ovara.backend.url=${opintopolku.virkailija.url}/ovara-backend
ovara.ui.url=${opintopolku.virkailija.url}/raportointi
cas.url=${opintopolku.virkailija.url}/cas
ovara-backend.cas.username={{ovara_backend_cas_username}}
ovara-backend.cas.password={{ovara_backend_cas_password}}
ovara-backend.cas.password={{ovara_backend_cas_password}}

ovara_backend.uses-ssl-proxy
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package fi.oph.ovara.backend.utils

import org.apache.catalina.connector.Connector
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
import org.springframework.boot.web.embedded.tomcat.{TomcatConnectorCustomizer, TomcatServletWebServerFactory}
import org.springframework.boot.web.server.WebServerFactoryCustomizer
import org.springframework.context.annotation.{Bean, Configuration}

@Configuration
@ConditionalOnProperty(Array("ovara_backend.uses-ssl-proxy"))
class ServletContainerConfiguration {

@Bean
def sslProxyCustomizer(): WebServerFactoryCustomizer[TomcatServletWebServerFactory] =
(container: TomcatServletWebServerFactory) =>
container.addConnectorCustomizers((connector: Connector) => {
connector.setScheme("https")
connector.setSecure(true)
})
}

0 comments on commit 06bcce9

Please sign in to comment.