]> prime8.dev >> repos - ttyd.git/commitdiff
server: allow http on https port
authorShuanglei Tao <tsl0922@gmail.com>
Sun, 28 Aug 2022 11:03:51 +0000 (19:03 +0800)
committerShuanglei Tao <tsl0922@gmail.com>
Sun, 28 Aug 2022 11:03:51 +0000 (19:03 +0800)
src/server.c

index c135ab94a3f73b0808c2285e16cded46b1066558..91e3a90c2a46409a13bfc6717558ac301755e014 100644 (file)
@@ -539,7 +539,7 @@ int main(int argc, char **argv) {
       info.ssl_ca_filepath = ca_path;
       info.options |= LWS_SERVER_OPTION_REQUIRE_VALID_OPENSSL_CLIENT_CERT;
     }
-    info.options |= LWS_SERVER_OPTION_REDIRECT_HTTP_TO_HTTPS;
+    info.options |= LWS_SERVER_OPTION_ALLOW_NON_SSL_ON_SSL_PORT | LWS_SERVER_OPTION_REDIRECT_HTTP_TO_HTTPS;
   }
 #endif