【问题标题】:MEAN stack app not opens from instagram profileMEAN 堆栈应用程序未从 instagram 个人资料打开
【发布时间】:2019-04-15 07:44:41
【问题描述】:

所以基本上我在我的 Instagram 个人资料上发布了我的 MEAN stack 应用程序网站 url,但是当我尝试打开它时它显示空白页面,但它可以在其他浏览器上打开。我也试图用 InAppBrowser 制作 Ionic 应用程序,它显示空白页。有人可以尝试向我解释我需要做什么吗?我的 server.js

const https = require('https');
const http = require('http');
const fs = require('fs');
const app = require('./app');

const options = {
    key: fs.readFileSync('./server.key'),
    cert: fs.readFileSync('./server.crt')
};

const https_port = 443;

const server_https = https.createServer(options, app);

server_https.listen(https_port,"0.0.0.0");

const http_port = 80;

const server_http = http.createServer(
function (req, res) {
    res.writeHead(301, { "Location": "https://" + req.headers['host'] + req.url });
    res.end();
});

server_http.listen(http_port,"0.0.0.0");

【问题讨论】:

    标签: node.js http express web mean-stack


    【解决方案1】:

    我刚刚在 SSL 选项中添加了 CA

    const options = {
        key: fs.readFileSync('./server.key'),
        cert: fs.readFileSync('./server.crt'),
        ca: fs.readFileSync('./server.ca')
    };
    

    【讨论】:

      猜你喜欢
      • 2015-12-11
      • 1970-01-01
      • 1970-01-01
      • 2014-02-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多