mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-11-17 17:23:08 +02:00
trust proxy
This commit is contained in:
parent
8e0d9a6a5d
commit
9682fcf22b
@ -1,4 +1,4 @@
|
|||||||
const fastify = require('fastify')();
|
const fastify = require('fastify')({ trustProxy: true });
|
||||||
const oauth = require('@fastify/oauth2');
|
const oauth = require('@fastify/oauth2');
|
||||||
const { domain } = require('./lib/http');
|
const { domain } = require('./lib/http');
|
||||||
const { short } = require('leeks.js');
|
const { short } = require('leeks.js');
|
||||||
@ -165,6 +165,7 @@ module.exports = async client => {
|
|||||||
// express server for settings
|
// express server for settings
|
||||||
const express = require('express')();
|
const express = require('express')();
|
||||||
const { handler } = await import('@discord-tickets/settings/build/handler.js');
|
const { handler } = await import('@discord-tickets/settings/build/handler.js');
|
||||||
|
express.set('trust proxy', true);
|
||||||
express.use((req, res, next) => {
|
express.use((req, res, next) => {
|
||||||
next();
|
next();
|
||||||
client.log.verbose.http(short(`Express ${req.ip} ${req.method} ${req.route?.path ?? req.path}`));
|
client.log.verbose.http(short(`Express ${req.ip} ${req.method} ${req.route?.path ?? req.path}`));
|
||||||
|
Loading…
Reference in New Issue
Block a user