frontend: ensure API_ORIGIN is always set

This commit is contained in:
Johannes Zellner
2024-08-23 19:28:26 +02:00
parent 199dbff7b1
commit 9f89b07777
5 changed files with 19 additions and 22 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ import { TextViewer, ImageViewer } from 'pankow-viewers';
import { createDirectoryModel } from '../models/DirectoryModel.js';
import { sanitize } from 'pankow/utils';
const API_ORIGIN = import.meta.env.VITE_API_ORIGIN ? 'https://' + import.meta.env.VITE_API_ORIGIN : '';
const API_ORIGIN = import.meta.env.VITE_API_ORIGIN ? 'https://' + import.meta.env.VITE_API_ORIGIN : window.origin;
export default {
name: 'Viewer',