|
|
|
@ -121,7 +121,7 @@ func handleRoomView(room string, w http.ResponseWriter, r *http.Request) {
@@ -121,7 +121,7 @@ func handleRoomView(room string, w http.ResponseWriter, r *http.Request) {
|
|
|
|
|
w.Header().Set("Cache-Control", "private, max-age=0") |
|
|
|
|
|
|
|
|
|
// Detect if the request was made with SSL.
|
|
|
|
|
ssl := false |
|
|
|
|
ssl := r.TLS != nil |
|
|
|
|
proto, ok := r.Header["X-Forwarded-Proto"] |
|
|
|
|
if ok { |
|
|
|
|
ssl = proto[0] == "https" |
|
|
|
@ -357,7 +357,14 @@ func runner(runtime phoenix.Runtime) error {
@@ -357,7 +357,14 @@ func runner(runtime phoenix.Runtime) error {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
runtime.DefaultHTTPHandler(r) |
|
|
|
|
err = runtime.DefaultHTTPHandler(r) |
|
|
|
|
if err != nil { |
|
|
|
|
log.Println("Failed to create HTTP handler", err) |
|
|
|
|
} |
|
|
|
|
err = runtime.DefaultHTTPSHandler(r) |
|
|
|
|
if err != nil { |
|
|
|
|
log.Println("Failed to create HTTPS handler", err) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return runtime.Start() |
|
|
|
|
} |
|
|
|
|