Explorar o código

Enable https in tutorial sample.

Luke Taylor %!s(int64=14) %!d(string=hai) anos
pai
achega
e4ecdd55f6
Modificáronse 1 ficheiros con 10 adicións e 0 borrados
  1. 10 0
      samples/tutorial/tutorial.gradle

+ 10 - 0
samples/tutorial/tutorial.gradle

@@ -33,4 +33,14 @@ dependencies {
 
 jettyRun {
     contextPath = "/tutorial"
+
+    def httpConnector = new org.mortbay.jetty.nio.SelectChannelConnector();
+    httpConnector.port = 8080
+    httpConnector.confidentialPort = 8443
+    def httpsConnector = new org.mortbay.jetty.security.SslSocketConnector();
+    httpsConnector.port = 8443
+    httpsConnector.keystore = httpsConnector.truststore = "$rootDir/samples/certificates/server.jks"
+    httpsConnector.keyPassword = httpsConnector.trustPassword = 'password'
+
+    connectors = [httpConnector, httpsConnector]
 }