Jaguar-dart / jaguar

Jaguar, a server framework built for speed, simplicity and extensible. ORM, Session, Authentication & Authorization, OAuth
http://jaguar-dart.github.io
463 stars 35 forks source link

Adding SSL for localhost within Flutter #130

Closed AbdullahAlAsad closed 5 years ago

AbdullahAlAsad commented 5 years ago

I am adding SSL by this way but it's not working

` ByteData data = await rootBundle.load('assets/ssl/certificate.pem'); ByteData keyBytes = await rootBundle.load('assets/ssl/keys.pem'); SecurityContext security = SecurityContext(); security.usePrivateKeyBytes(keyBytes.buffer.asInt8List(), password: '123456'); security.setTrustedCertificatesBytes(data.buffer.asInt8List()); final server = Jaguar(port: 2723, securityContext: security); server.addRoute(serveFlutterAssets()); await server.serve(logRequests: true);

// debug server.log.onRecord.listen((r) => print(r));` I am calling -- https:/localhost:2723/index.html but it's not working.

Anything missing here ?

tejainece commented 5 years ago

Will be handled here: https://github.com/jaguar-examples/flutter_webview/issues/7