We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 26b53ba commit 01f1a9fCopy full SHA for 01f1a9f
build/media_source/system/js/core.es6.js
@@ -623,8 +623,12 @@ window.Joomla.Modal = window.Joomla.Modal || {
623
const token = Joomla.getOptions('csrf.token', '');
624
625
// Use the CSRF only on the site's domain
626
- // eslint-disable-next-line no-restricted-globals
627
- if (token && (newOptions.url.startsWith('/') || newOptions.url.startsWith(location.origin))) {
+ if (
+ token && (
628
+ (!newOptions.url.startsWith('http:') && !newOptions.url.startsWith('https:'))
629
+ || newOptions.url.startsWith(window.location.origin)
630
+ )
631
+ ) {
632
xhr.setRequestHeader('X-CSRF-Token', token);
633
}
634
0 commit comments