Skip to content
This repository was archived by the owner on Jun 15, 2021. It is now read-only.

Commit 18692fc

Browse files
authored
Merge pull request #21 from kindlyops/http-redirect
Http redirect
2 parents 0faf9fb + 367d44d commit 18692fc

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

k8s/havenweb-service.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ metadata:
44
name: havenweb-service
55
namespace: default
66
annotations:
7+
service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "443"
78
service.beta.kubernetes.io/aws-load-balancer-ssl-cert: arn:aws:acm:us-west-2:211129858938:certificate/7f310d29-03a1-4321-bb84-cb76355a8b90
89
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http
910
spec:
@@ -13,4 +14,9 @@ spec:
1314
- protocol: TCP
1415
port: 443
1516
targetPort: http
17+
name: ssl
18+
- protocol: TCP
19+
port: 80
20+
targetPort: http
21+
name: http
1622
type: LoadBalancer

web/Caddyfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
0.0.0.0
22

3+
redir 301 {
4+
if {>X-Forwarded-Proto} is http
5+
/ https://{host}{uri}
6+
}
7+
38
log / stdout "{combined}"
49

510
templates /js .js

0 commit comments

Comments
 (0)