internet-information-services
Version:
internet-information-services
90 lines (84 loc) • 2.32 kB
JavaScript
var iis = require("./internet-information-services");
var sites = {
admin: {
domains: [
{
domain: "localhost"
},
{
protocol: "https",
domain: "localhost",
options: {
pfx: 'iis.pfx',
passphrase: "123123"
}
}
]
},
default: {
domains: [
{
protocol: "http",
domain: "localhost"
},
{
protocol: "https",
domain: "localhost",
options: {
pfx: 'iis.pfx',
passphrase: "123123"
}
}
]
},
test: {
domains: [
{
protocol: "http",
domain: "localhost",
port: 82
},
{
protocol: "http",
domain: "127.0.0.1",
port: 82
},
{
protocol: "https",
domain: "localhost",
port: 446,
options: {
pfx: 'iis.pfx',
passphrase: "123123"
}
},
{
protocol: "https",
domain: "127.0.0.1",
port: 446,
options: {
pfx: 'iis.pfx',
passphrase: "123123"
}
}
],
stop: true
}
};
function gateway(request, response) {//每个entity-frame里面也可以单独设置gateway,在每个站点的index.js里面。
var ip = scope.request.headers["x-forwarded-for"] ||
scope.request.connection.remoteAddress ||
scope.request.socket.remoteAddress ||
scope.request.connection.socket.remoteAddress;
var length = scope.request.headers["content-length"];
var host = scope.request.headers["host"];
var controller = scope.controller;
var auth = scope.Auth;
//return false;//拒绝该次请求
}
iis.init({
admin: "qwe123",
sites: sites,
path: __dirname,
gateway: null
});