Skip to content

Commit 1f3d955

Browse files
committed
docs(framework): document ignoreUrlParams configuration option
1 parent d343e4c commit 1f3d955

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

docs/2-advanced/01-configuration.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ There are several configuration settings that affect all UI5 Web Components glob
2020
| [enableDefaultTooltips](#enableDefaultTooltips) | `true`, `false` | `true` | Whether to display default tooltips | Components (Icon, Button, RatingIndicator, etc.) |
2121
| [timezone](#timezone) | `Asia/Tokyo`, `Pacific/Apia`, `Asia/Kolkata`, `Europe/Sofia` and etc. | Your local time zone. | Allows to override your local time zone. | Date/time components (`ui5-date-picker`, etc.) |
2222
| [themeRoot](#themeRoot) | String to a URL - see the [themeRoot](#themeRoot) section below | N/A | Allows to set a URL to a Theme-designer-created custom theme. | All components |
23+
| [ignoreUrlParams](#ignoreUrlParams) | `true`, `false` | `false` | Whether to ignore URL parameters during configuration initialization | Framework |
2324

2425
### theme
2526
<a name="theme"></a>
@@ -304,6 +305,24 @@ or, the preferred new format:
304305

305306
Failing to do so will result in a warning in the console and the theme root will not be set.
306307

308+
### ignoreUrlParams
309+
<a name="ignoreUrlParams"></a>
310+
311+
This configuration option controls whether URL parameters (e.g. `sap-ui-theme`, `sap-ui-language`, `sap-ui-animationMode`) are processed during framework initialization.
312+
313+
By default, the framework reads `sap-*` and `sap-ui-*` URL parameters and uses them to override the configuration script settings. While useful during development and testing, this behavior can be a security concern in production environments since URL parameters are user-controlled input that can be manipulated through crafted links.
314+
315+
When set to `true`, all URL parameter processing is skipped and only the configuration script and module imports are used.
316+
317+
Example:
318+
```html
319+
<script data-ui5-config type="application/json">
320+
{
321+
"ignoreUrlParams": true
322+
}
323+
</script>
324+
```
325+
307326
## Configuration Script
308327
<a name="script"></a>
309328

@@ -406,4 +425,10 @@ import { getTimezone } from "@ui5/webcomponents-base/dist/config/Timezone.js";
406425

407426
```js
408427
import { getThemeRoot, setThemeRoot } from "@ui5/webcomponents-base/dist/config/ThemeRoot.js";
428+
```
429+
430+
- `ignoreUrlParams`
431+
432+
```js
433+
import { getIgnoreUrlParams, setIgnoreUrlParams } from "@ui5/webcomponents-base/dist/config/UrlParams.js";
409434
```

0 commit comments

Comments
 (0)