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服务器向此服务器发送请求.这给使用本地开发环境的开发人员带来 ...
随机推荐
- windows和linux修改ipv6和ipv4的优先级
如果一台机器系统配置ipv6地址和ipv4地址共存,访问两种网站都可以 但有个很尴尬的问题,因为操作系统默认是V6优先于V4,所以比如一个地址同时有A和AAAA记录的话,那么系统会自动选择V6协议通信 ...
- Vim配置及其他注意事项
常用的一些配置 set t_ti= set t_te= "这两个比较特殊,后边说 set termencoding=utf-8 set encoding=utf-8 set fileenco ...
- 从零开始学Java (三)基础语法
1. 基本数据类型 整数类型:byte,short,int,long 浮点数类型:float,double 字符类型:char 布尔类型:boolean java最小单位是bit,一个byte占用8个 ...
- 【题解】 CF767E Change-free
洛谷链接 这个题翻译忘了输入,我看的英语原文...... 首先,这是一道贪心题 我的大致方法:pair+堆优 题目分析: 从第一天开始,到最后一天,每天可以选择找钱或者不找钱. 如果不找钱,则零钱数m ...
- nodejs如何下载指定版本
浏览了一下nodejs的官网,但是官网没有下载低版本的下载地址,所以找了一个可以下载指定版本node的下载地址https://nodejs.org/download/release/v8.9.4/
- 上海某小公司面试题:Java线程池来聊聊
<对线面试官>系列目前已经连载11篇啦!进度是一周更新两篇,欢迎持续关注 [对线面试官]Java注解 [对线面试官]Java泛型 [对线面试官] Java NIO [对线面试官]Java反 ...
- Spring框架——IOC&DI
Spring Spring 目标 内容 Spring与web整合的原理 Spring 中包含的关键特性 Spring架构图 企业级框架 企业级系统 IOCDI IOC DI IOC和DI 为什么使用依 ...
- SparkSQL访问Hive源,MySQL源
SparkSQL访问Hive源,MySQL源 一.SparkSQL访问Hive源 软件环境 SparkSQL命令行模式可以直接连接Hive的 Java程序SparkSQL连接Hive 二.SparkS ...
- TCP IP SOCKET 笔记
网络由下往上分为 物理层.数据链路层.网络层.传输层.会话层.表示层和应用层. 通过初步的了解,我知道IP协议对应于网络层,TCP协议对应于传输层,而HTTP协议对应于应用层, 三者从本质上来说没有可 ...
- jenkins 简介和简单操作
持续集成:Continuous Intergration (CI) 持续交付:Continuous Delivery(CD) 持续部署:Continuous Deployment(CD) jenkin ...