<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content

Convert All HTTP URLs to HTTPS in Okta Access Gateway

Access Gateway
Okta Classic Engine
Okta Identity Engine

Overview

Some HTTP links for an application fail to convert to HTTPS even when Content Rewrite is enabled in Okta Access Gateway (OAG), causing application functionality issues. Because OAG requires HTTPS, unconverted links result in access errors. Administrators can resolve this by adding specific proxy redirection and substitution filter directives to the advanced root policy of the application.

Applies To

  • Okta Identity Engine (OIE)
  • Okta Classic Engine
  • Okta Access Gateway (OAG)

Cause

Okta Access Gateway requires HTTPS for all traffic. If the Content Rewrite feature fails to rewrite specific HTTP links, the application generates access errors when attempting to load those resources.

Solution

How are HTTP URLs converted to HTTPS using advanced policies?

Modify the root policy of the affected application to include proxy redirection and substitution filter directives by following these steps.

  1. Edit the affected application and navigate to the Policies section.
  2. Edit the root policy, and under the Advanced section, add the following directives to convert all HTTP links to HTTPS.
proxy_redirect 'http://' 'https://';
subs_filter 'http:// ' 'https:// ';
  1. Select Okay in the Policies section, and then select Done to save the settings and update the application.

How is a specific port removed from the returned location?

Use the $host variable in the proxy redirection directive to remove a specific port, such as port 80, from a returned location like http://public_domain:80 to achieve an expected location of https://public_domain.

proxy_redirect http://$http_host:80 https://$http_host ;
Loading
Convert All HTTP URLs to HTTPS in Okta Access Gateway | Okta Support