How to enable HTTPS for local development in macOS using Chrome
How to enable HTTPS for local development in macOS using Chrome
HTTPS, macOS, Chrome
local HTTPS
https://www.cnblogs.com/xgqfrms/p/13582130.html
localhost & HTTPS

- 隐藏警告



- 修改证书

拖拽 icon

localhost.cer





Quit keychains, 刷新 Chrome

生成证书
key , cert 有效期
keytmp.pem
cert.pem
key.pem
$ openssl req -x509 -newkey rsa:2048 -keyout keytmp.pem -out cert.pem -days 365
# 123456
$ openssl rsa -in keytmp.pem -out key.pem

React 17 & SSR
{
"start": "HTTPS=true react-scripts start"
}
{
"start": "export HTTPS=true && SSL_CRT_FILE=cert.pem && SSL_KEY_FILE=key.pem react-scripts start",
}
demo
https://github.com/xgqfrms/react-in-depth/tree/master/https-app
key & cert
https://github.com/xgqfrms/react-in-depth/blob/master/https-app/cert.pem
https://github.com/xgqfrms/react-in-depth/blob/master/https-app/key.pem
https://github.com/xgqfrms/react-in-depth/blob/master/https-app/package.json
{
"name": "https-app",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^7.1.2",
"react": "^16.14.0",
"react-dom": "^16.14.0",
"react-scripts": "3.4.3"
},
"scripts": {
"dev": "react-scripts start",
"start": "export HTTPS=true && SSL_CRT_FILE=cert.pem && SSL_KEY_FILE=key.pem react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
refs
https://flaviocopes.com/react-how-to-configure-https-localhost/
https://flaviocopes.com/macos-install-ssl-local/
https://medium.com/@jonsamp/how-to-set-up-https-on-localhost-for-macos-b597bcf935ee
https://dev.to/tability/local-development-with-https-on-osx-1jpb
xgqfrms 2012-2020
www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!
How to enable HTTPS for local development in macOS using Chrome的更多相关文章
- Enable HTTPS in Spring Boot
Spring-boot-enable-ssl Enable HTTPS in Spring Boot APRIL 14, 2015DRISS AMRI This weekend I answered ...
- How do I copy SQL Azure database to my local development server?(如何将Azure 中的数据库备份到本地)
Now you can use the SQL Server Managerment Studio to do this: Connect to the SQL Azure database. 通过 ...
- HTTPS页面使用CNZZ统计代码,Chrome显示警告怎么办?
很多站长会遇到一个问题,网站加入CNZZ的JS统计代码后,Chrome浏览器出现警告:阻止跨站解析器阻断脚本通过document.write调用(A parser-blocking, cross si ...
- macOS下Chrome和Safari导入证实抓包HTTPS
目录 下载证书 mac OS导入证书 Chrome设置代理 Safari设置代理 下面的操作基于Mac OS Catalina(v10.15.3),抓包拦截工具基于Burp Suite v2.1.05 ...
- browser-sync & http server
browser-sync & http server browser-sync https://www.browsersync.io/ usage # step 1 $ npm install ...
- 接口测试之——Charles抓包及常见问题解决(转载自https://www.jianshu.com/p/831c0114179f)
简介 Charles其实是一款代理服务器,通过成为电脑或者浏览器的代理,然后截取请求和请求结果达到分析抓包的目的.该软件是用Java写的,能够在Windows,Mac,Linux上使用,安装Charl ...
- Implementing HTTPS Everywhere in ASP.Net MVC application.
Implementing HTTPS Everywhere in ASP.Net MVC application. HTTPS everywhere is a common theme of the ...
- TroubleShoot: Enable Developer Mode in Windows 10 Insider Preview Build 10074
There is a known issue in Windows 10 Insider Preview build 10074 (see here). Developers cannot enabl ...
- 5分钟上手:本地开发环境启动HTTPS
今天我们访问的所有网站几乎都是受HTTPS保护的.如果你的站点还没有,那你应该使用它.使用HTTPS保护服务器也意味着你不能从不是HTTPS服务器向此服务器发送请求.这给使用本地开发环境的开发人员带来 ...
随机推荐
- Linux服务器内存池技术是如何实现的
Linux服务器内存池技术是如何实现的
- Simple decorator that intercepts connection errors and ignores these if settings specify this.
django-redis/cache.py at master · jazzband/django-redis https://github.com/jazzband/django-redis/blo ...
- 两个list<Map<String,String>>放入一个list中
// public static void main(String[] args) {// List<Map<String, String>> list2 = new Arra ...
- python基础(int,str,bool,list)
1数字int. 数字主要是用于计算用的,使用方法并不是很多,就记住一种就可以: bit_length() #bit_length() 当十进制用二进制表示时,最少使用的位数 v = 11 1 ...
- Hash Map集合和Hash Set集合
HashMap集合的使用 1.1.每个集合对象的创建(new) 1.2.从集合中添加元素 1.3.从集合中取出某个元素 1.4.遍历集合 public class HashMapTest { publ ...
- CF733F
扯在前面 人生第一道黑(>▽< ). 那天听了老师讲图论讲了这道题,发现这道黑题并不是很黑于是就做了做,在同机房dalao的帮助下三个小时做完(太菜了),于是来发篇题解. 正文 题意 给出 ...
- xss靶场详解
一个XSS靶场练习记录 https://blog.csdn.net/qq_41500251/article/details/101116697 001.level 1 反射型 1.观察源码 <s ...
- 非Windows系统 如何解压带中文密码和中文文件名的zip压缩文件
数据科学交流群,群号:189158789 ,欢迎各位对数据科学感兴趣的小伙伴的加入! 一.安装unar软件包: Linux(Debian系列): apt install unarLinux(RedHa ...
- Mysql数据库版本高低引起的group by问题
低版本的Mysql,group by限制性比较小,在进行group by时,select的对象可包含多个,但是换成高版本5.6以上好像,使用group by 以后,select的对象必须也已经被聚合, ...
- HPE 交换机基础配置
1.交换机命名 (config)# hostname POE-SW 2.vlan创建及端口划分 1)端口加入vlan,两种方式 (config)# vlan 2 (vlan-2)# untagged ...