Application JavaScript Files Fail to Load Through Okta Access Gateway
Last Updated:
Overview
An application fails to render successfully through Okta Access Gateway (OAG) because the backend JavaScript files expect a public domain instead of a private domain host header. Administrators can resolve this issue by enabling the public domain for the host header in the OAG Admin UI. When this issue occurs, browser developer tools display a 403 error for specific JavaScript files, while other resources load correctly. The issue persists even after setting NO_AUTH for the application, but direct access to the failing JavaScript files via a separate browser tab or curl succeeds.
Applies To
- Okta Identity Engine (OIE)
- Okta Classic Engine
- Okta Access Gateway (OAG)
Cause
The OAG application sends a private domain as a host header, but the backend JavaScript files expect a public domain. This mismatch causes rendering to fail through OAG, while direct access to the failing JavaScript files succeeds. This issue can also affect resources other than JavaScript files.
Solution
How does an administrator resolve the 403 error for JavaScript files in Okta Access Gateway?
Enable the public domain for the host header in the Okta Access Gateway Admin UI to resolve the rendering issue.
- Open the application in the OAG Admin UI in edit mode.
- Navigate to the Advanced section and enable Public domain for host header.
NOTE: For OAG versions 2025.8 and above, administrators can configure this setting in the Protected Web Resource section. - Save the application.
