|
| 1 | +// Module included in the following assemblies: |
| 2 | +// * assembly/architecture |
| 3 | + |
| 4 | +[id='web-console-overview-{context}'] |
| 5 | += Understanding the web console |
| 6 | + |
| 7 | +The web console runs as a pod on the master. The static assets required to run |
| 8 | +the web console are served by the pod. Administrators can also customize the web |
| 9 | +console using extensions, which let you run scripts and load custom stylesheets |
| 10 | +when the web console loads. |
| 11 | + |
| 12 | +When you access the web console from a browser, it first loads all required |
| 13 | +static assets. It then makes requests to the {product-title} APIs using the |
| 14 | +values defined from the `oc cluster up` option `--public-master`, or from the |
| 15 | +related parameter `masterPublicURL` in the `webconsole-config` config map |
| 16 | +defined in the `openshift-web-console` namespace. The web console uses |
| 17 | +WebSockets to maintain a persistent connection with the API server and receive |
| 18 | +updated information as soon as it is available. |
| 19 | + |
| 20 | +The configured host names and IP addresses for the web console are whitelisted |
| 21 | +to access the API server safely even when the browser would consider the |
| 22 | +requests to be cross-origin. To access the API server from a web application |
| 23 | +using a different host name, you must whitelist that host name by specifying the |
| 24 | +`--cors-allowed-origins` option on `oc cluster up` or from the related master |
| 25 | +configuration file parameter `corsAllowedOrigins`. |
| 26 | + |
| 27 | +The `corsAllowedOrigins` parameter is controlled by the configuration field. No |
| 28 | +pinning or escaping is done to the value. The following is an example of how you |
| 29 | +can pin a host name and escape dots: |
| 30 | + |
| 31 | +---- |
| 32 | +corsAllowedOrigins: |
| 33 | +- (?i)//my\.subdomain\.domain\.com(:|\z) |
| 34 | +---- |
| 35 | + |
| 36 | +* The `(?i)` makes it case-insensitive. |
| 37 | +* The `//` pins to the beginning of the domain (and matches the double slash |
| 38 | +following `http:` or `https:`). |
| 39 | +* The `\.` escapes dots in the domain name. |
| 40 | +* The `(:|\z)` matches the end of the domain name `(\z)` or a port separator `(:)`. |
0 commit comments