Skip to content

Commit 7556e37

Browse files
committed
fix(ws): use relative path
1 parent 361483a commit 7556e37

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/app/Settings/Config/FeatureLevels.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ const Component = () => {
6464
.filter((v) => typeof v === 'string')
6565
.map((v): { key: string; value: number } => ({ key: String(v), value: FeatureLevel[v] }))
6666
.filter((v) => {
67-
if (!process.env.CRYOSTAT_AUTHORITY) {
67+
if (!process.env.CRYOSTAT_AUTHORITY || process.env.CRYOSTAT_AUTHORITY === '.') {
6868
return v.value !== FeatureLevel.DEVELOPMENT;
6969
}
7070
return true;

src/app/Shared/Services/NotificationChannel.service.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export class NotificationChannel {
8181

8282
const url = new URL(window.location.href);
8383
url.protocol = url.protocol.replace('http', 'ws');
84-
url.pathname = '/api/notifications';
84+
url.pathname = 'api/notifications';
8585
this.ws = webSocket({
8686
url: url.toString(),
8787
protocol: '',

src/mirage/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export const startMirage = ({ environment = 'development' } = {}) => {
5959

6060
routes() {
6161
this.timing = 0;
62-
this.urlPrefix = process.env.CRYOSTAT_AUTHORITY || '';
62+
this.urlPrefix = process.env.CRYOSTAT_AUTHORITY || '.';
6363
this.namespace = '/';
6464
this.logging = environment === 'development';
6565

webpack.prod.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ module.exports = merge(common('production'), {
4242
chunkFilename: '[name].[contenthash].bundle.css' // lazy-load css
4343
}),
4444
new EnvironmentPlugin({
45-
CRYOSTAT_AUTHORITY: '',
45+
CRYOSTAT_AUTHORITY: '.',
4646
PREVIEW: process.env.PREVIEW || 'false'
4747
})
4848
],

0 commit comments

Comments
 (0)