mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
92b78f7c15
These are 2 measures for improving security of cookies. One is used to not send the cookie over HTTP (only HTTPS) and the other tells the browser to disallow client-side code accessing the cookie.
29 lines
761 B
JavaScript
Executable File
29 lines
761 B
JavaScript
Executable File
#! /usr/bin/env node
|
|
|
|
import Server from "./lib/Server";
|
|
import { GlobalDependencies } from "../types/Dependencies";
|
|
import YAML = require("yamljs");
|
|
|
|
const configurationFilepath = process.argv[2];
|
|
if (!configurationFilepath) {
|
|
console.log("No config file has been provided.");
|
|
console.log("Usage: authelia <config>");
|
|
process.exit(0);
|
|
}
|
|
|
|
const yamlContent = YAML.load(configurationFilepath);
|
|
|
|
const deps: GlobalDependencies = {
|
|
u2f: require("u2f"),
|
|
dovehash: require("dovehash"),
|
|
ldapjs: require("ldapjs"),
|
|
session: require("express-session"),
|
|
winston: require("winston"),
|
|
speakeasy: require("speakeasy"),
|
|
nedb: require("nedb"),
|
|
ConnectRedis: require("connect-redis")
|
|
};
|
|
|
|
const server = new Server(deps);
|
|
server.start(yamlContent, deps);
|