Skip to content

Enable proxy using system properties #252

@brucetony

Description

@brucetony

Because we want to be able to pass proxy information when needed, a new method must be added to the baseHttpClientConnector in the CommonSslSpringConfig, we just need to add .proxyWithSystemProperties() e.g.

    @Qualifier("BASE_SSL_HTTP_CLIENT_CONNECTOR")
    @Bean
    ReactorClientHttpConnector baseHttpClientConnector(@Qualifier("COMMON_NETTY_SSL_CONTEXT") SslContext sslContext) {
        return new ReactorClientHttpConnector(
                HttpClient
                        .create()
                        .proxyWithSystemProperties()
                        .secure(t -> t.sslContext(sslContext)));
    }

Then we can pass proxy information using the JAVA_TOOL_OPTIONS envVar e.g.

-Dhttp.proxyHost=squid.internal -Dhttp.proxyPort=3128 -Dhttps.proxyHost=squid.internal -Dhttps.proxyPort=3128 -Dhttp.nonProxyHosts=localhost|flame-node-keycloak -Dhttps.nonProxyHosts=localhost|flame-node-keycloak

There is no need to update the helm chart, I am already working on some helper methods for parsing this information in a new branch on the helm repo

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions