Skip to content

Commit

Permalink
allowing frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
costero-e committed Oct 17, 2023
1 parent f2b5b8a commit ca18e18
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
7 changes: 6 additions & 1 deletion beacon/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def main(path=None):
#)

beacon = web.Application(
middlewares=[web.normalize_path_middleware(), middlewares.error_middleware, cors_middleware(origins=["https://beacon-network-test.ega-archive.org", "https://beacon-network-test2.ega-archive.org", "https://beacon-network-demo.ega-archive.org","https://beacon-network-demo2.ega-archive.org", "http://localhost:3000", "https://beacon-network-cineca-demo.ega-archive.org"])]
middlewares=[web.normalize_path_middleware(), middlewares.error_middleware, cors_middleware(origins=["https://beacon-network-test.ega-archive.org", "https://beacon-network-test2.ega-archive.org", "https://beacon-network-demo.ega-archive.org","https://beacon-network-demo2.ega-archive.org", "http://localhost:3000", "http://localhost:3010", "https://beacon-network-cineca-demo.ega-archive.org"])]
)


Expand Down Expand Up @@ -107,6 +107,11 @@ def main(path=None):
expose_headers="*",
allow_methods=("POST", "PATCH", "GET", "OPTIONS"),
allow_headers=DEFAULT_ALLOW_HEADERS),
"http://localhost:3010":
aiohttp_cors.ResourceOptions(allow_credentials=True,
expose_headers="*",
allow_methods=("POST", "PATCH", "GET", "OPTIONS"),
allow_headers=DEFAULT_ALLOW_HEADERS),
"https://beacon-network-test2.ega-archive.org":
aiohttp_cors.ResourceOptions(allow_credentials=True,
expose_headers="*",
Expand Down
2 changes: 1 addition & 1 deletion deploy/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ services:
command: ["node", "/opt/yarn-v1.22.19/bin/yarn.js", "start" ]
container_name: react
ports:
- 3010:3000
- 3000:3000
volumes:
- ../frontend:/usr/src/app

4 changes: 2 additions & 2 deletions frontend/src/config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{

"API_URL": "localhost:5050/api",
"API_URL": "http://localhost:5050/api",
"REDIRECT_URL": "please insert here your redirect URL",
"KEYCLOAK_URL": "https://beacon-network-demo2.ega-archive.org"
"KEYCLOAK_URL": "http://localhost:8080"

}
2 changes: 1 addition & 1 deletion frontend/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const oidcConfig = {
automaticSilentRenew: true,
redirectUri:
process.env.NODE_ENV === 'development'
&& 'https://beacon-network-demo.ega-archive.org/',
&& 'http://localhost:3000/',
scope: 'openid profile email ga4gh_passport_v1 offline_access',
revokeAccessTokenOnSignout: true
};
Expand Down

0 comments on commit ca18e18

Please sign in to comment.