Skip to content

Instantly share code, notes, and snippets.

@arundhaj
Created June 20, 2021 06:06
Show Gist options
  • Save arundhaj/d1ee3ca087208e843c4cff20a5d0a8df to your computer and use it in GitHub Desktop.
Save arundhaj/d1ee3ca087208e843c4cff20a5d0a8df to your computer and use it in GitHub Desktop.
Using Angular CLI and self-signed SSL Certificate to serve over HTTPS in localhost
[req]
default_bits = 2048
prompt = no
default_md = sha256
x509_extensions = v3_req
distinguished_name = dn
[dn]
C = IN
ST = India
L = India
O = My Organisation
OU = My Organisational Unit
emailAddress = [email protected]
CN = localhost
[v3_req]
subjectAltName = @alt_names
[alt_names]
DNS.1 = localhost
openssl req -new -x509 -newkey rsa:2048 -sha256 -nodes -keyout localhost.key -days 3560 -out localhost.crt -config certificate.cnf
@ngrbalu
Copy link

ngrbalu commented Oct 23, 2021

ng serve --ssl --ssl-cert C:\Arun\angular-https\localhost.crt --ssl-key C:\angular-https\localhost.key

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment