Move x-forwarded-for middleware

This commit is contained in:
calzoneman 2015-10-27 23:54:32 -07:00
parent 13d4a49976
commit c2726898e5
6 changed files with 53 additions and 40 deletions

View file

@ -1,5 +1,10 @@
import clone from 'clone';
const DEFAULT_TRUSTED_PROXIES = [
'127.0.0.1',
'::1'
];
export default class WebConfiguration {
constructor(config) {
this.config = config;
@ -8,6 +13,10 @@ export default class WebConfiguration {
getEmailContacts() {
return clone(this.config.contacts);
}
getTrustedProxies() {
return DEFAULT_TRUSTED_PROXIES.slice();
}
}
WebConfiguration.fromOldConfig = function (oldConfig) {