Skip to content

Commit

Permalink
Cors configuration (#27)
Browse files Browse the repository at this point in the history
* Fixed traefik configuration for archiver load balancer healthcheck

* Updated Deploy.md, updated service versions in dev docker-compose and increased default node sync threshold.

* CORS configuration for archiver and http services.

---------

Co-authored-by: LINCKODE <linckode@gmail.com>
  • Loading branch information
0xluk and LINCKODE authored May 9, 2024
1 parent cd89334 commit 218d9d4
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions dev.docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@ services:
- "traefik.http.middlewares.qubic-http.headers.accesscontrolalloworiginlist=*"
- "traefik.http.routers.qubic-http.entrypoints=web"
- "traefik.http.routers.qubic-http.rule=Host(`testapi.qubic.org`) && (PathPrefix(`/v1/broadcast-transaction`) || PathPrefix(`/v1/tick-info`) || PathPrefix(`/v1/balances`))"
- "traefik.http.routers.qubic-http.middlewares=qubic-http-stripprefix"
- "traefik.http.middlewares.qubic-http-stripprefix.stripprefix.prefixes=/v1"
- "traefik.http.routers.qubic-http.middlewares=qubic-archiver-stripprefix, cors"
- "traefik.http.middlewares.cors.headers.accesscontrolallowmethods=*"
- "traefik.http.middlewares.cors.headers.accesscontrolalloworiginlist=*"
- "traefik.http.middlewares.cors.headers.accesscontrolmaxage=300"
- "traefik.http.middlewares.cors.headers.addvaryheader=true"
- "traefik.http.services.qubic-http.loadbalancer.server.port=8000"
environment:
QUBIC_API_SIDECAR_SERVER_HTTP_HOST: "0.0.0.0:8000"
Expand All @@ -31,14 +35,19 @@ services:
labels:
- "traefik.enable=true"
- "traefik.http.routers.qubic-archiver.rule=Host(`testapi.qubic.org`) && PathPrefix(`/v1`)"
- "traefik.http.routers.qubic-archiver.middlewares=qubic-archiver-stripprefix"
- "traefik.http.middlewares.qubic-archiver-stripprefix.stripprefix.prefixes=/v1"
- "traefik.http.routers.qubic-archiver.middlewares=qubic-archiver-stripprefix, cors"
- "traefik.http.middlewares.cors.headers.accesscontrolallowmethods=*"
- "traefik.http.middlewares.cors.headers.accesscontrolalloworiginlist=*"
- "traefik.http.middlewares.cors.headers.accesscontrolmaxage=300"
- "traefik.http.middlewares.cors.headers.addvaryheader=true"
- "traefik.http.routers.qubic-archiver.entrypoints=web"
- "traefik.http.services.qubic-archiver.loadbalancer.server.port=8000"
- "traefik.http.services.qubic-archiver.loadbalancer.healthcheck.path=/healthcheck"
- "traefik.http.services.qubic-archiver.loadbalancer.healthcheck.interval=30s"
- "traefik.http.services.qubic-archiver.loadbalancer.healthcheck.timeout=5s"
- "traefik.http.services.qubic-archiver.loadbalancer.healthcheck.scheme=http"
- "traefik.http.services.qubic-archiver.loadbalancer.healthcheck.statuscodes=200"
ports:
- "127.0.0.1:8001:8000"
environment:
Expand Down

0 comments on commit 218d9d4

Please sign in to comment.