Skip to content

gitlab host 不支持 HTTPS 协议 #3

Open

Description

@jnadorg

oauth在调用后端的时候不支持 gitlab服务器为https地址,例如 https://gitlab.com/

尝试修改增加了https的依赖, 但是修改后提示错误: The "listener" argument must be of type Function. Received type object".
因为不熟悉node,也没有相关的开发环境,只能到这了,下面是修改的代码片段,修改没成功就不推请求了....

const https = require('https')

...

   requestInfo(ops, path, method) {
       return new Promise((resolve, reject) => {
           let req = '';
           var client = http;
           // You can use url.protocol as well 
           if (ops.host.toString().indexOf("https") === 0){
                       client = https;
           }
           let http_client = client.request(ops.host + path,
               {
                   
                   method: method
               },

 ...

Activity

  1. jnadorg commented on Mar 15, 2019

    @jnadorg
    Author

    计划什么时候支持 https ?

    我这没有相关的工具链,原计划是希望作者可以fix这个问题.

  2. netscrt commented on Jul 13, 2019

    @netscrt

    我这边测试成功了,node版本是11.10.0

  3. zhamdoctor commented on Aug 28, 2020

    @zhamdoctor

    我这边测试成功了,node版本是11.10.0

    怎么搞https的

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions