diff --git a/server/venueless/settings.py b/server/venueless/settings.py index 61e9eb85..5a657cb2 100644 --- a/server/venueless/settings.py +++ b/server/venueless/settings.py @@ -299,6 +299,11 @@ ROOT_URLCONF = "venueless.urls" +CORS_ORIGIN_REGEX_WHITELIST = [ + r"^https?://(\w+\.)?eventyay\.com$", # Allow any subdomain of eventyay.com + r"^https?://video\.eventyay\.com(:\d+)?$", # Allow video.eventyay.com with any port + r"^https?://video-dev\.eventyay\.com(:\d+)?$", # Allow video-dev.eventyay.com with any port +] if DEBUG: CORS_ORIGIN_REGEX_WHITELIST = [ r"^http://localhost$", diff --git a/webapp/config.js b/webapp/config.js index af42d328..8d02ba7a 100644 --- a/webapp/config.js +++ b/webapp/config.js @@ -4,13 +4,14 @@ let config if (ENV_DEVELOPMENT || !window.venueless) { const hostname = window.location.hostname const wsProtocol = window.location.protocol === 'https:' ? 'wss' : 'ws'; + const httpProtocol = window.location.protocol; config = { api: { - base: `http://${hostname}:8443/api/v1/worlds/sample/`, + base: `${httpProtocol}//${hostname}:8443/api/v1/worlds/sample/`, socket: `${wsProtocol}://${hostname}:8443/ws/world/sample/`, - upload: `http://${hostname}:8443/storage/upload/`, - scheduleImport: `http://${hostname}:8443/storage/schedule_import/`, - feedback: `http://${hostname}:8443/_feedback/`, + upload: `${httpProtocol}//${hostname}:8443/storage/upload/`, + scheduleImport: `${httpProtocol}//${hostname}:8443/storage/schedule_import/`, + feedback: `${httpProtocol}//${hostname}:8443/_feedback/`, }, defaultLocale: 'en', locales: ['en', 'de', 'pt_BR'], diff --git a/webapp/vue.config.js b/webapp/vue.config.js index e34db147..f700f374 100644 --- a/webapp/vue.config.js +++ b/webapp/vue.config.js @@ -9,8 +9,9 @@ const NODE_PATH = process.env.NODE_PATH module.exports = { devServer: { - host: 'localhost', + host: '0.0.0.0', port: 8880, + public: 'video-dev.eventyay.com', allowedHosts: [ '.localhost', '.eventyay.com',