Commit 6e0ffede authored by Marek Veselý's avatar Marek Veselý
Browse files

Resolve "Fix initial subscription error"

parent ab56d5b1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@ docker run -p 80:80 inject-fe
During runtime of the container it's required to bind the container to a given `backend` instance:

```
docker run -p 80:80 -e VITE_HTTP_HOST=secure-be.inject.muni.cz -e VITE_HTTP_WS=wss://secure-be.inject.muni.cz/ttxbackend/v1/graphql inject-fe
docker run -p 80:80 -e VITE_HTTP_HOST=secure-be.inject.muni.cz -e VITE_HTTP_WS=wss://secure-be.inject.muni.cz/inject/v1/graphql inject-fe
```

Please keep in mind that changing environment variables requires restarting the container if done during runtime.
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -141,7 +141,7 @@ INJECT_DEBUG=
# do not touch unless you know what you are doing
INJECT_HOST_ADDRESSES=$INJECT_DOMAIN
VITE_HTTP_HOST=$INJECT_DOMAIN
VITE_HTTP_WS=ws://$INJECT_DOMAIN/ttxbackend/api/v1/subscription
VITE_HTTP_WS=ws://$INJECT_DOMAIN/inject/api/v1/subscription
CORS_ALLOWED_ORIGINS=http://$INJECT_DOMAIN
```

+1 −1
Original line number Diff line number Diff line
@@ -84,7 +84,7 @@ These parameters are setup by default in the `.env` file, it's adviced to not mo
# host parameters that should be set up for the client and server to interact correctly
INJECT_HOST_ADDRESSES=$INJECT_DOMAIN
VITE_HTTP_HOST=$INJECT_DOMAIN
VITE_HTTP_WS=wss://$INJECT_DOMAIN/ttxbackend/api/v1/subscription
VITE_HTTP_WS=wss://$INJECT_DOMAIN/inject/api/v1/subscription
CORS_ALLOWED_ORIGINS=https://$INJECT_DOMAIN
```

+1 −1
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@ export const httpGraphql = (hostAddress: string) =>
export const httpHello = (hostAddress: string) =>
  `${currentProtocol()}://${hostAddress}/inject/api/v1/version`
export const wsGraphql = (hostAddress: string) =>
  `ws${currentProtocol() === 'https' ? 's' : ''}://${hostAddress}/ttxbackend/api/v1/subscription/`
  `ws${currentProtocol() === 'https' ? 's' : ''}://${hostAddress}/inject/api/v1/subscription/`
export const uploadDefinitionUrl = (hostAddress: string) =>
  `${currentProtocol()}://${hostAddress}/inject/api/v1/exercise_definition/upload-definition`
export const validateDefinitionUrl = (hostAddress: string) =>