summaryrefslogtreecommitdiffstats
path: root/.ship/Caddyfile
blob: 572e43dc17500041092ac0968dca84f9f2abba14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
muxstr.x.bdw.to {
	# Route native gRPC to port 50051                                                                                                                                                       
	@grpc {
	  header Content-Type application/grpc*
	}
	reverse_proxy @grpc localhost:50051 {
	  transport http {
	      versions h2c
	  }
	}

	# Everything else (Connect, WebSocket, HTML) to port 8007
	reverse_proxy localhost:8007 {
	  # Enable WebSocket support
	  header_up Upgrade {http.request.header.Upgrade}
	  header_up Connection {http.request.header.Connection}
	}
}