Fórum

Detect if behind a proxy?

Kevin Thorpe, modificado 10 Anos atrás.

Detect if behind a proxy?

New Member Postagens: 13 Data de Entrada: 09/08/12 Postagens Recentes
Hi, just trying to set up a cluster behind an SSL proxy and I'm wondering if LifeRay can detect it's behind a proxy.

To run standalone I have:
web.server.http.port=-1
web.server.https.port=-1
web.server.protocol=http

To run behind the proxy I have:
web.server.http.port=80
web.server.https.port=443
web.server.protocol=https

Is there any way I can dynamically choose these options so both direct access (for in-house testing) and proxy access will work? My proxy can add an extra HTTP header so I can detect if the traffic is from there. I don't think that code is allowed in portal-ext.properties is it?

I need to do this to be able to talk directly to one of the cluster servers instead of being offered one at random by the load balancer.