When accessing a website through an Edge SWG (ProxySG) with SSL decryption enabled, you encounter an HTTP 500 Internal Server Error. This issue specifically occurs during POST requests while logging into the website. The error prevents you from successfully authenticating to the site even when providing valid credentials.
Investigation using an HTTP Debug shows that the proxy identifies the website's authentication headers as credentials intended for the proxy itself. This results in the headers being stripped before the request reaches the origin content server (OCS). The issue is caused by Authentication Header Collision.
The website uses HTTP Basic Authentication for its login process. Because you are already authenticated to the proxy via the initial CONNECT request, the proxy's internal logic identifies the subsequent Authorization: Basic header in the decrypted stream as credentials meant for the proxy. Consequently, the proxy consumes and strips the header before forwarding the request. The OCS or the security manager protecting the site then returns a 500 error because the required credentials are missing.
To resolve this issue, you can configure the proxy to pass the authentication headers directly to the origin server instead of intercepting them.
Apply the following Content Policy Language (CPL) to the specific login URL to prevent the proxy from interpreting the headers:
example.com with the affected domain and replace the path.substring with the path. If you prefer not to use the path that part can be removed):<Proxy>
url.domain=example.com url.path.substring="portal/api/login" authenticate(no, upstream_authentication)
This policy tells the proxy not to interpret or strip the authentication headers for this specific domain, passing them directly to the OCS.
If the overall policy design allows this traffic based on the user or group results, you may also need to add an "ALLOW" object to the new rule so it doesn't inadvertently deny the traffic now that authentication is disabled for this request.
If the primary resolution cannot be applied, consider one of the following options: