cowboy

certificate unknown(46)

寵の児 提交于 2021-02-19 04:33:10
因为腾讯云的网站备案迟迟没有批下来,因此使用了朋友在阿里云的域名yk,我则申请了一台阿里云服务器,并将域名解析映射至该服务器。SSL证书则是在腾讯云上申请的,使用了Apache文件夹中的文件,放置在cowboy的priv/ssl目录下,1_root_bundle为根证书,2_yk.crt为网站证书,3_yk.key为密钥。一切布置妥当后,在PC的chrome、android的chrome、苹果手机的微信等环境中均可以正常访问,但是在android的微信中访问时服务器报如下错误: client alert Fatal: unknown certificate(46) RFC中的解释是: certificate_unknown Some other (unspecified) issue arose in processing the certificate, rendering it unacceptable. 搜索到一些信息,如: https://cweiske.de/tagebuch/https-client-cert-unknown.htm 也使用wireshark抓包排查了流程,但是由于对SSL不是非常了解,始终没有找到进一步的原因和方向。后来向一些朋友请教,整理了思路。对于这种问题,首先要到SSL测试网站上测试具体的问题: https://www.myssl.cn

Nccloud1909集成方案说明

限于喜欢 提交于 2020-10-22 01:42:16
Nccloud单点手册 wangmo 2020年07月01日 本方案适用于version:Nccloud1909+,不支持1903,1903有其他实现方案; 功能支持:单点登陆,单点审批,单点联查 单点登陆 1:业务系统向Nccloud注册accesstoken 请求参数 : usercode = wangmo 模拟地址 : http : //localhost/service/registAccessToken?usercode=wangmo 成功响应 :{ "status" : "1" , "result" :{ "accesstoken" : "20011b791553a8338e4b9a7c8936111c" }} 失败响应 :{ "status" : "0" , "result" : "nccloud系统中没有usercode对应的用户,请联系管理员同步人员并生成用户!" } 2:业务系统携带Token访问Nccloud登陆页面 请求地址 : http : //localhost/nccloud/resources/uap/rbac/thirdpartylogin/main/index.html?accesstoken=20011b791553a8338e4b9a7c8936111c 成功响应 : 将直接转到首页http : //localhost/nccloud

史上最全SpringCloud2.0视频教程

荒凉一梦 提交于 2020-08-08 14:03:46
史上最全SpringCloud2.0视频教程 作者:97后互联网架构-余胜军 点评:网上很多关于SpringCloud视频教程,都是需要收费的而且不全! 该套教程蚂蚁课堂&每特教育架构培训实际互动课程,老师讲解非常清晰。 视频资料齐全 百度云盘下载地址: 蚂蚁课堂在线观看地址: 史上最全SpringCloud2.0视频教程 链接: https://pan.baidu.com/s/1q70Q8jKrvhBpDnDxmN0vTw 提取码:0s4c 蚂蚁课堂在线观看地址: http://www.mayikt.com/front/couinfo/91/0 还有在线观看官方 腾讯课堂: https://ke.qq.com/course/280057?taid=3810701143721465 ———————————————— 版权声明:本文为CSDN博主「cowboy8888999」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。 原文链接:https://blog.csdn.net/cowboy8888999/article/details/90672012 来源: oschina 链接: https://my.oschina.net/u/2963604/blog/4314489

服务器结构总结

∥☆過路亽.° 提交于 2020-03-09 11:16:13
数据库设计 erlang + mysql5.6 设计 网络设计 erlang +cowboy + ranch + http/https设计 逻辑设计 erlang + 代码结构 + 断线重连 日志设计 日志保存 + 数据库日志保存 协议设计 erlang + protobuf/自定义协议格式 配置导表设计 excle + php 导报 协议生成设计 php 导出协议/protobuf 导出协议+ 序列化/反序列化 代码编译 编译成beam文件 服务器运维设计 linux + shell 脚本 + 热更新 + 代码同步 充值付费设计 sdb对接 + php服务器验证+ 服务器验证+ 发货 + 充值记录 分布式跨服机制 erlang + 分布式跨服机制 机器人机制/压测 tsung + robo机制验证 合服机制 数据库的简单合并(注意key值得合并即可,以及有些数据值得删除操作) 脚本的数据库合并(用脚本的方式避免各个key值得重复,需要每个功能都写合服脚本) 来源: oschina 链接: https://my.oschina.net/gaoxepro/blog/3190364

how to download file by erlang cowboy?

妖精的绣舞 提交于 2020-01-16 00:38:11
问题 I want to download file from the browser and I try to achieve by cowboy, however I failed and the browser show me that "Repeat header received from the server.". I have no idea, everyone please help me. this is my code of handler: ` %% @doc GET echo handler. -module(toppage_handler2). -export([init/3]). -export([handle/2]). -export([terminate/3]). init(_Transport, Req, []) -> {ok, Req, undefined}. handle(Req, State) -> {Method, Req2} = cowboy_req:method(Req), {Echo, Req3} = cowboy_req:qs_val(

Kernel pid terminated application start failure, bad_return

落花浮王杯 提交于 2019-12-25 09:32:04
问题 I wrote a cowboy project that I start on localhost with gmake run . When I make run on a fresh installation, this error happens: ~/tunnel# make run erlang.mk:24: Please upgrade to GNU Make 4 or later: https://erlang.mk/guide/installation.html make[1]: Entering directory `/root/tunnel/deps/cowboy' ../../erlang.mk:24: Please upgrade to GNU Make 4 or later: https://erlang.mk/guide/installation.html make[2]: Entering directory `/root/tunnel/deps/cowlib' ../../erlang.mk:24: Please upgrade to GNU

Issue when registering two local process with gproc within cowboy websocket handler

北战南征 提交于 2019-12-25 08:24:47
问题 I tried to register a bunch of processes with a unique family name with gproc under a cowboy websocket handler. In my handler I created two method, the first one is to handle registration: websocket_handle({text, <<"Reg: ",Message/binary>>}, State) -> io:format("Client ~p requesting to register ~n",[Message]), MyPID=list_to_binary(pid_to_list(self())), {[{_,Family}]}=jiffy:decode(Message), io:format("Client ~p requesting to register ~n",[Family]), Test = gproc:reg({p, l, Family}), erlang

communicating between http handler and websocket handler in Cowboy

白昼怎懂夜的黑 提交于 2019-12-23 11:57:43
问题 I'd like to create a websocket app in Cowboy that gets its data from another Cowboy handler. Let's say that I want to combine the Echo_get example from cowboy: https://github.com/ninenines/cowboy/tree/master/examples/echo_get/src with websocket example https://github.com/ninenines/cowboy/tree/master/examples/websocket/src in such a way that a GET request to Echo should send a "push" via websocket handler to the html page in that example. What is the least complicated way to do it? Can I use

How to configure the Plug.Static without Phoenix

纵然是瞬间 提交于 2019-12-20 14:10:52
问题 I am trying to figure out how to configure Plug.Static without any other framework (Phoenix, Sugar, etc); just Cowboy, Plug and Elixir. I just don't know how to put things together in the Router. plug :match plug Plug.Static, at: "/pub", from: :cerber plug :dispatch get "/" do Logger.info "GET /" send_resp(conn, 200, "Hello world\n") end Is the declaration of Plug.Static at the right place ? Shouldn't it be after plug :dispatch ? Do I need to define an additional route With this declaration:

Facing intermittent 404 issue when calling Rails API

江枫思渺然 提交于 2019-12-20 04:56:34
问题 I have banged my head on this for 2 days now and i dint find any luck yet. Looking for help on this. The issue: Front End makes 10 similar XHR requests ( for different users ) to my Rails API and few of the requests randomly fails with 404 status code. My Observations: If i make the same request again, It passes. I dont see any trace of 404 requests even hitting my server ( using logs ). I do see different response headers for 200 and 404 ( mentioned below ) and i see cowboy ( https://github