Use RequestIP to keep track of uploaders' IPs

This is mostly done as a security measure in the even that a foul being uploads content to this image bin that needs to be investigated by the police / FBI later. Honestly I don't think this'll happen but better safe than sorry.
This commit is contained in:
Jose 2020-08-22 21:14:12 -05:00
commit 9e1ceda9e6

View file

@ -6,12 +6,14 @@ import mongoose from 'mongoose'
import multer from 'multer' import multer from 'multer'
import path from 'path' import path from 'path'
import * as routes from './app/routes' import * as routes from './app/routes'
import {mw as RipMw} from 'request-ip'
config() config()
const init = async () => { const init = async () => {
const app = express() const app = express()
app.use(RipMw())
app.use(json()) app.use(json())
app.use(urlencoded({ app.use(urlencoded({
extended: true extended: true