Some of the http links for an application are not converted to https even when Content Rewrite is enabled, which is causing issues in some of the application's functionalities.
- Okta Access Gateway (OAG)
OAG only works with https. If some of the links are not being rewritten to use https, access errors can be noticed.
- Edit the affected application and go to the Policies section.
- Edit root policy, and under the Advanced section, add the two directives below. These will convert all http links to https:
proxy_redirect 'http://' 'https://'; subs_filter 'http:// ' 'https:// '; - Save the settings by clicking Okay in the Policies section, followed by Done to update the application.
In addition to the above, the $host variable can be used if only the port needs to be removed.
- For example, if the returned location is http://public_domain:80 and the expected one is https://public_domain, the following directive can be used:
proxy_redirect http://$http_host:80 https://$http_host ;
