breautek commented on issue #122:
URL:
https://github.com/apache/cordova-browser/issues/122#issuecomment-1649856184
I don't think it's really as simple as throwing in a `--https` flag. Using
the HTTPS module is one thing, but it also needs a key/certificate pair. That
could potentially be generated on the fly when the platform is created/added
for as long as using self signed certificates is acceptable (which should be if
this is purely used for development/local testing).
Normally I'd suggest using a reverse proxy server. The 2 common web server
engines are Apache and NGINX and they both have reverse proxy capabilities and
isn't too difficult to setup. The overall concept is that you connect to a
webserver, which has SSL configured, and it terminates the SSL and forwards the
connection to the node server.
I'm not familiar with Apache myself, but a minimal NGINX configuration would
look something like:
```
server {
listen 0.0.0.0:443 ssl http2;
server_name dev.example.com 127.0.0.1;
# could be a self-signed key
ssl_certificate /etc/nginx/ssl/nginx.crt;
ssl_certificate_key /etc/nginx/ssl/nginx.key;
location {
proxy_pass http://127.0.0.1:8080; # this would be the node server.
}
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]