You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cmd/ff-proxy/main.go
+29-4Lines changed: 29 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -111,6 +111,9 @@ var (
111
111
generateOfflineConfigbool
112
112
configDirstring
113
113
portint
114
+
tlsEnabledbool
115
+
tlsCertstring
116
+
tlsKeystring
114
117
)
115
118
116
119
const (
@@ -139,6 +142,9 @@ const (
139
142
configDirEnv="CONFIG_DIR"
140
143
pprofEnabledEnv="PPROF"
141
144
portEnv="PORT"
145
+
tlsEnabledEnv="TLS_ENABLED"
146
+
tlsCertEnv="TLS_CERT"
147
+
tlsKeyEnv="TLS_KEY"
142
148
143
149
bypassAuthFlag="bypass-auth"
144
150
debugFlag="debug"
@@ -165,6 +171,9 @@ const (
165
171
configDirFlag="config-dir"
166
172
flagPollIntervalFlag="flag-poll-interval"
167
173
portFlag="port"
174
+
tlsEnabledFlag="tls-enabled"
175
+
tlsCertFlag="tls-cert"
176
+
tlsKeyFlag="tls-key"
168
177
)
169
178
170
179
funcinit() {
@@ -194,6 +203,10 @@ func init() {
194
203
flag.BoolVar(&generateOfflineConfig, generateOfflineConfigFlag, false, "if true the proxy will produce offline config in the /config directory then terminate")
195
204
flag.StringVar(&configDir, configDirFlag, "/config", "specify a custom path to search for the offline config directory. Defaults to /config")
196
205
flag.IntVar(&port, portFlag, 8000, "port the relay proxy service is exposed on, default's to 8000")
206
+
flag.BoolVar(&tlsEnabled, tlsEnabledFlag, false, "if true the proxy will use the tlsCert and tlsKey to run with https enabled")
207
+
flag.StringVar(&tlsCert, tlsCertFlag, "", "Path to tls cert file. Required if tls enabled is true.")
208
+
flag.StringVar(&tlsKey, tlsKeyFlag, "", "Path to tls key file. Required if tls enabled is true.")
Copy file name to clipboardExpand all lines: docs/tls.md
+6-1Lines changed: 6 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,12 @@
1
1
# Enabling TLS
2
+
There are two ways to configure the Relay Proxy to accept HTTPS requests.
2
3
3
-
The Relay Proxy does not currently natively support running with TLS enabled (coming soon).
4
+
### Native TLS (Beta)
5
+
You can configure the Relay Proxy to start with HTTPS enabled. This can be configured using the TLS config options. See [configuration](./configuration.md) for details.
4
6
7
+
This does not provide every fine-grained configuration option available to secure servers. If you require more control the best option is to use a program made for this purpose, and follow the "External TLS" option below.
8
+
9
+
### External TLS
5
10
The recommended way to connect to the Relay Proxy using TLS is to place a reverse proxy such as nginx in front of the Relay Proxy. Then all connected sdks should make requests to the reverse proxy url instead of hitting the Relay Proxy directly.
0 commit comments