Skip to content

Commit

Permalink
Add localhost:4173 to allowed CORS origins (#4141)
Browse files Browse the repository at this point in the history
This origin is used for serving the lookout UI's production bundle locally.
  • Loading branch information
mauriceyap authored Jan 14, 2025
1 parent b2d99ad commit 7e6ca31
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .run/LookoutV2.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<module name="armada" />
<working_directory value="$PROJECT_DIR$" />
<envs>
<env name="ARMADA_CORSALLOWEDORIGINS" value="&quot;http://localhost:3000,http://localhost:8089,http://localhost:10000,http://example.com:10000,http://example.com:8089&quot;" />
<env name="ARMADA_CORSALLOWEDORIGINS" value="&quot;http://localhost:3000,http://localhost:4173,http://localhost:8089,http://localhost:10000,http://example.com:10000,http://example.com:8089&quot;" />
<env name="ARMADA_POSTGRES_CONNECTION_HOST" value="localhost" />
<env name="ARMADA_POSTGRES_CONNECTION_PORT" value="5432" />
</envs>
Expand Down
2 changes: 1 addition & 1 deletion .run/Server.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<working_directory value="$PROJECT_DIR$" />
<parameters value="--config ./developer/config/insecure-armada.yaml" />
<envs>
<env name="ARMADA_CORSALLOWEDORIGINS" value="&quot;http://localhost:3000,http://localhost:8089,http://localhost:10000,http://example.com:10000,http://example.com:8089&quot;" />
<env name="ARMADA_CORSALLOWEDORIGINS" value="&quot;http://localhost:3000,http://localhost:4173,http://localhost:8089,http://localhost:10000,http://example.com:10000,http://example.com:8089&quot;" />
<env name="ARMADA_QUERYAPI_POSTGRES_CONNECTION_HOST" value="localhost" />
<env name="ARMADA_EVENTSAPIREDIS_ADDRS" value="localhost:6379" />
<env name="ARMADA_METRICSPORT" value="9005" />
Expand Down
2 changes: 1 addition & 1 deletion .run/lookoutv2PostgresMigration.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<working_directory value="$PROJECT_DIR$" />
<parameters value="--migrateDatabase" />
<envs>
<env name="ARMADA_CORSALLOWEDORIGINS" value="&quot;http://localhost:3000,http://localhost:8089,http://localhost:10000,http://example.com:10000,http://example.com:8089&quot;" />
<env name="ARMADA_CORSALLOWEDORIGINS" value="&quot;http://localhost:3000,http://localhost:4173,http://localhost:8089,http://localhost:10000,http://example.com:10000,http://example.com:8089&quot;" />
<env name="ARMADA_POSTGRES_CONNECTION_HOST" value="localhost" />
<env name="ARMADA_POSTGRES_CONNECTION_PORT" value="5432" />
</envs>
Expand Down
2 changes: 1 addition & 1 deletion developer/env/docker/binoculars.env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ARMADA_CORSALLOWEDORIGINS="http://localhost:3000,http://localhost:10000,http://example.com:10000"
ARMADA_CORSALLOWEDORIGINS="http://localhost:3000,http://localhost:4173,http://localhost:10000,http://example.com:10000"
ARMADA_HTTP_PORT=8082
2 changes: 1 addition & 1 deletion developer/env/docker/lookoutv2.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARMADA_POSTGRES_CONNECTION_PORT=5432
ARMADA_CORSALLOWEDORIGINS="http://localhost:3000,http://localhost:10000,http://localhost:8082,http://example.com:10000"
ARMADA_CORSALLOWEDORIGINS="http://localhost:3000,http://localhost:4173,http://localhost:10000,http://localhost:8082,http://example.com:10000"
ARMADA_UICONFIG_ARMADAAPIBASEURL="http://localhost:8080"
ARMADA_UICONFIG_BINOCULARSBASEURLPATTERN="http://localhost:8082"
2 changes: 1 addition & 1 deletion developer/env/docker/server.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
ARMADA_QUEUECACHEREFRESHPERIOD="1s"
ARMADA_CORSALLOWEDORIGINS="http://localhost:3000,http://localhost:10000,http://example.com:10000"
ARMADA_CORSALLOWEDORIGINS="http://localhost:3000,http://localhost:4173,http://localhost:10000,http://example.com:10000"
ARMADA_QUERYAPI_POSTGRES_CONNECTION_HOST=postgres
2 changes: 1 addition & 1 deletion developer/env/local/binoculars.env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ARMADA_CORSALLOWEDORIGINS="http://localhost:3000,http://localhost:8089,http://example.com:8089"
ARMADA_CORSALLOWEDORIGINS="http://localhost:3000,http://localhost:4173,http://localhost:8089,http://example.com:8089"
2 changes: 1 addition & 1 deletion developer/env/local/lookoutv2.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARMADA_POSTGRES_CONNECTION_HOST="localhost"
ARMADA_POSTGRES_CONNECTION_DBNAME=postgres
ARMADA_POSTGRES_CONNECTION_PORT=5432
ARMADA_CORSALLOWEDORIGINS="http://localhost:3000,http://localhost:8089,http://localhost:10000,http://example.com:10000,http://example.com:8089"
ARMADA_CORSALLOWEDORIGINS="http://localhost:3000,http://localhost:4173,http://localhost:8089,http://localhost:10000,http://example.com:10000,http://example.com:8089"
2 changes: 1 addition & 1 deletion developer/env/local/server.env
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
EXECUTOR_UPDATE_INTERVAL="1s"
ARMADA_CORSALLOWEDORIGINS=="http://localhost:3000,http://localhost:8089,http://localhost:10000,http://example.com:10000,http://example.com:8089"
ARMADA_CORSALLOWEDORIGINS=="http://localhost:3000,http://localhost:4173,http://localhost:8089,http://localhost:10000,http://example.com:10000,http://example.com:8089"
ARMADA_EVENTSAPIREDIS_ADDRS=localhost:6379
ARMADA_POSTGRES_CONNECTION_HOST=localhost
ARMADA_PULSAR_URL=pulsar://localhost:6650
Expand Down
7 changes: 7 additions & 0 deletions internal/lookout/ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,10 @@ yarn build

This builds the app for production to the `build` folder. It correctly bundles
React in production mode and optimizes the build for the best performance.

You can then run a server to serve this production bundle locally on
[http://localhost:4173](http://localhost:4173):

```bash
yarn serve
```

0 comments on commit 7e6ca31

Please sign in to comment.