CSP base-uri restriction
Restricts which URLs a document may use as its base URL.
Support in current browsers
Checked against the current browser versions recorded in MDN browser data 8.0.7.
| Browser | Minimum | Outcome | Reason |
|---|---|---|---|
| Chrome | 150 | Works | Every required mapped BCD feature is available without a recorded qualification. |
| Edge | 150 | Works | Every required mapped BCD feature is available without a recorded qualification. |
| Firefox | 152 | Works | Every required mapped BCD feature is available without a recorded qualification. |
| Safari | 26.5 | Works | Every required mapped BCD feature is available without a recorded qualification. |
| Chrome for Android | 150 | Works | Every required mapped BCD feature is available without a recorded qualification. |
| Firefox for Android | 152 | Works | Every required mapped BCD feature is available without a recorded qualification. |
| Safari on iOS | 26.5 | Works | Every required mapped BCD feature is available without a recorded qualification. |
| Android WebView | 150 | Works | Every required mapped BCD feature is available without a recorded qualification. |
| Samsung Internet | 29.0 | Works | Every required mapped BCD feature is available without a recorded qualification. |
What this feature can and cannot do
Helps protect against
- Base-tag injection
- Relative URL target manipulation
Does not guarantee
- Absolute malicious URLs
- Unsafe permitted base URLs
- Server-side routing
What you need before using it
- A CSP delivered for the protected document
Fallback to keep in place
Use absolute security-sensitive URLs and prevent untrusted base elements.