Move x-forwarded-for middleware
This commit is contained in:
parent
13d4a49976
commit
c2726898e5
6 changed files with 53 additions and 40 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue