Skip to content
This repository has been archived by the owner on Jun 20, 2018. It is now read-only.

Commit

Permalink
Use the path of the url request in haproxy ACL, because port changes
Browse files Browse the repository at this point in the history
The request from inside static_web (see docker-compose.yml)
to fox_LB (LB stands for load balancer, see fox_LB/haproxy.cfg) goes
through a nodejs proxy that uses CORS (changeOrigin is set to true
in static/properties.sample.json). This means that the request
port is changed and we have to rely on the request's URL path to
decide which backend to send the request.

In the case of fox service, it seems that frontend balancer can
listen on 8090, but the ACL, defined inside the balancer (see the
fox_LB/haproxy.cfg), uses the new port assigned due to CORS. #33
  • Loading branch information
peterjasc committed Aug 4, 2016
1 parent 7351e93 commit 64e5746
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions config/fox_LB/fox_LB_hap.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ frontend fox_balancer
bind *:8091
mode http

acl is_fox url_port 8090
acl is_session url_port 8091

acl is_fox path_dir /fox
use_backend fox if is_fox

acl is_session path_dir /login
use_backend session if is_session

backend fox
Expand Down

0 comments on commit 64e5746

Please sign in to comment.