Fluxheim/문서/Reverse Proxy

Reverse Proxy

애플리케이션 서버 앞에 Fluxheim을 둡니다. Fluxheim이 TLS, header, limit, upstream selection을 처리합니다.

Basic proxy

[[vhosts]]
name = "app"
hosts = ["app.example.com"]

[[vhosts.routes]]
path_prefix = "/"
action = "proxy"
upstreams = ["127.0.0.1:3000"]

route 선택

feature사용할 때
path_exact하나의 URL에 precise route가 필요합니다.
path_prefix전체 URL subtree가 하나의 backend로 갑니다.
strip_prefixbackend가 public prefix를 보면 안 됩니다.
rewrite_prefixbackend가 다른 internal prefix를 기대합니다.
methodsroute가 선택된 HTTP method만 허용해야 합니다.

path rewrite 예제

[[vhosts.routes]]
name = "api"
path_prefix = "/api/"
strip_prefix = "/api/"
rewrite_prefix = "/internal/"

[vhosts.routes.proxy]
upstreams = ["10.0.0.20:8080"]
connect_timeout_secs = 5
read_timeout_secs = 30
send_timeout_secs = 30

프로덕션 참고

  • 애플리케이션은 loopback 또는 private network에 유지하세요.
  • 업로드를 노출하기 전에 request body limit을 설정하세요.
  • Use trusted proxy settings only for networks you control.
  • 서로 다른 path에 서로 다른 safety rule이 필요하면 하나의 큰 fallback보다 explicit route를 선호하세요.
한국어