Commit ff68d834 authored by Marek Veselý's avatar Marek Veselý
Browse files

Merge branch '449-fix-initial-subscription-error' into 'main'

Resolve "Fix initial subscription error"

Closes #449

See merge request inject/frontend!377
parents 803434ac 6e0ffede
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line 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:
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.
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 Original line Diff line number Diff line
@@ -141,7 +141,7 @@ INJECT_DEBUG=
# do not touch unless you know what you are doing
# do not touch unless you know what you are doing
INJECT_HOST_ADDRESSES=$INJECT_DOMAIN
INJECT_HOST_ADDRESSES=$INJECT_DOMAIN
VITE_HTTP_HOST=$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
CORS_ALLOWED_ORIGINS=http://$INJECT_DOMAIN
```
```


+1 −1
Original line number Original line 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
# host parameters that should be set up for the client and server to interact correctly
INJECT_HOST_ADDRESSES=$INJECT_DOMAIN
INJECT_HOST_ADDRESSES=$INJECT_DOMAIN
VITE_HTTP_HOST=$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
CORS_ALLOWED_ORIGINS=https://$INJECT_DOMAIN
```
```


+1 −1
Original line number Original line Diff line number Diff line
@@ -5,7 +5,7 @@ export const httpGraphql = (hostAddress: string) =>
export const httpHello = (hostAddress: string) =>
export const httpHello = (hostAddress: string) =>
  `${currentProtocol()}://${hostAddress}/inject/api/v1/version`
  `${currentProtocol()}://${hostAddress}/inject/api/v1/version`
export const wsGraphql = (hostAddress: string) =>
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) =>
export const uploadDefinitionUrl = (hostAddress: string) =>
  `${currentProtocol()}://${hostAddress}/inject/api/v1/exercise_definition/upload-definition`
  `${currentProtocol()}://${hostAddress}/inject/api/v1/exercise_definition/upload-definition`
export const validateDefinitionUrl = (hostAddress: string) =>
export const validateDefinitionUrl = (hostAddress: string) =>