Skip to content

Commit

Permalink
Update base path when access from server (#234)
Browse files Browse the repository at this point in the history
* use the same ico with eventyay-talk

* update base path for webapp using basePath from config file

* add public path for whole system

* add base path for server side

---------

Co-authored-by: odkhang <[email protected]>
  • Loading branch information
lcduong and odkhang authored Sep 18, 2024
1 parent 942e140 commit 835f97d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion server/venueless/control/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ class WorldAdminToken(AdminBase, DetailView):
success_url = "/control/worlds/"

def get(self, request, *args, **kwargs):
base_path = settings.BASE_PATH
world = self.get_object()
jwt_config = world.config["JWT_secrets"][0]
secret = jwt_config["secret"]
Expand All @@ -204,7 +205,7 @@ def get(self, request, *args, **kwargs):
action_type="world.adminaccess",
data={},
)
return redirect(f"https://{world.domain}/#token={token}")
return redirect(f"https://{world.domain}{base_path}/#token={token}")


class FormsetMixin:
Expand Down
1 change: 1 addition & 0 deletions server/venueless/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
SECRET_KEY = os.environ.get(
"VENUELESS_DJANGO_SECRET", config.get("django", "secret", fallback="")
)
BASE_PATH = config.get("venueless", "base_path", fallback="")
if not SECRET_KEY:
SECRET_FILE = os.path.join(DATA_DIR, ".secret")
if os.path.exists(SECRET_FILE):
Expand Down
7 changes: 4 additions & 3 deletions webapp/vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const currentYear = new Date().getFullYear()
const NODE_PATH = process.env.NODE_PATH

module.exports = {
publicPath: '/video', // global path setting
devServer: {
host: '0.0.0.0',
port: 8880,
Expand All @@ -24,15 +25,15 @@ module.exports = {
themeColor: '#180044',
manifestOptions: {
icons: [{
src: '/eventyay-logo.192.png',
src: '/video/eventyay-logo.192.png',
type: 'image/png',
sizes: '192x192'
}, {
src: '/eventyay-logo.512.png',
src: '/video/eventyay-logo.512.png',
type: 'image/png',
sizes: '512x512'
}, {
src: '/eventyay-logo.svg',
src: '/video/eventyay-logo.svg',
sizes: '192x192 512x512'
}],
},
Expand Down

0 comments on commit 835f97d

Please sign in to comment.