Avoid CORS for background queue invokations
authorAlexander Ebert <ebert@woltlab.com>
Fri, 6 Jan 2017 11:28:22 +0000 (12:28 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 6 Jan 2017 11:28:28 +0000 (12:28 +0100)
wcfsetup/install/files/js/WoltLabSuite/Core/BootstrapFrontend.js

index 76cf96115a0758343f15cc4020136859e508ccc5..3d90f1a28ce7a20260813bfc01625acf72120159 100644 (file)
@@ -30,6 +30,9 @@ define(
                 * @param       {object<string, *>}     options         bootstrap options
                 */
                setup: function(options) {
+                       // fix the background queue URL to always run against the current domain (avoiding CORS)
+                       options.backgroundQueue.url = WSC_API_URL + options.backgroundQueue.url.substr(WCF_PATH.length);
+                       
                        Bootstrap.setup();
                        
                        UiPageHeaderMenu.init();