Wiki

Case Status Kiln
Log In

Wiki

 
Procedures»Configuring EWF to Run Behind …
  • RSS Feed

Last modified on 12/14/2014 4:12 PM by User.

Tags:

Configuring EWF to Run Behind a Reverse Proxy

Overriding Secure Connection Detection

EWL prevents accessing an application that supports secure requests from a nonsecure connection. EWL does this by checking that https was used to make the request. However, this can be wrong and cause infinite redirection loops when EWL is behind a proxy or load balancer that is handling SSL for the application. Usually, the device will use another mechanism, such as a non-standard request header to communicate that the connection is safe.

To override the default secure connection detection, override the IsSecureRequest in the EwfApp class. Below is an example.

 

public override bool RequestIsSecure( HttpRequest request ) {
            get {
                var isSecureHeader = request.Headers[ "sslenabled" ];
                if( !isSecureHeader.IsNullOrWhiteSpace() )
                    return isSecureHeader.EqualsIgnoreCase( "true" );
                return base.IsSecureRequest;
            }
        }

Overriding the Current Request Host Name and Base Path

Override EwfApp.getRequestHost and/or .getRequestBasePath. See the documentation on these methods for more information.