博客 (4)

image.png

使用 myssl.com 检测证书状态,显示握手失败(No FS No SNI):

image.png

发现 XP 上的 IE6 和 IE8 均无法访问该站点,原因是 XP 不支持 FS,不支持 SNI。

可以尝试在 IIS 的站点的“绑定”中更改“需要服务器名称指示”来实现正常访问。

步骤参阅:https://xoyozo.net/Blog/Details/wxpay-notify-url-https

当然,前提是服务器上必须已启用相关的协议版本和加密方式(按需启用),建议使用 IISCrypto

image.png

xoyozo 5 年前
6,239

当微信支付的 notify_url 填写的是 https 的回调地址时,如果遇到支付成功但没有接收到回调的情况,可能是服务器开启了 SNI。

SNI,即服务器名称指示,用于在一台服务器上支持多个网站使用不同的 SSL 证书。

解决方案:

  • 方法一、notify_url 改为 http 的回调地址,缺点是容易被运营商 QJ,而且如果日后网站开启强制要求 https 访问就会使回调失败;

  • 方法二、【不推荐】可以为该网站单独配置一台服务,不使用 SNI,缺点是增加成本;

  • 方法三、【推荐】该网站仍然“需要服务器名称指示”,在 IIS 中给默认网站(不是当前网站)添加一个 https 的域名绑定,不勾选“需要服务器名称指示”,证书随便选一个。缺点是时间一长容易忘记有这回事,不要轻易删除该绑定就好了,而且在网站搬迁的时候也同样要做该配置。

image.png

感谢 V2EX

xoyozo 5 年前
6,599

若在谷歌浏览器中记住密码,再次打开时,表单中自动填充的文本框和下拉框都变成了黄色背景,影响界面美观,可以使用以下样式修正:

/* Change Autocomplete styles in Chrome*/
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus
input:-webkit-autofill, 
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
  border: 1px solid green;
  -webkit-text-fill-color: green;
  -webkit-box-shadow: 0 0 0px 1000px #000 inset;
  transition: background-color 5000s ease-in-out 0s;
}

具体样式请自行修改。

参考资料:https://css-tricks.com/snippets/css/change-autocomplete-styles-webkit-browsers/

xoyozo 7 年前
4,384
 
如何使用,点官网右侧 usage
另外参考: http://blog.csdn.net/jiji262/archive/2007/09/10/1779454.aspx

SyntaxHighlighter is here to help a developer/coder to post code snippets online with ease and have it look pretty. It's 100% Java Script based and it doesn't care what you have on your server.

效果图
xoyozo 16 年前
4,198