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:
parent
a476453d1c
commit
9e1ceda9e6
1 changed files with 2 additions and 0 deletions
|
|
@ -6,12 +6,14 @@ import mongoose from 'mongoose'
|
|||
import multer from 'multer'
|
||||
import path from 'path'
|
||||
import * as routes from './app/routes'
|
||||
import {mw as RipMw} from 'request-ip'
|
||||
|
||||
config()
|
||||
|
||||
const init = async () => {
|
||||
const app = express()
|
||||
|
||||
app.use(RipMw())
|
||||
app.use(json())
|
||||
app.use(urlencoded({
|
||||
extended: true
|
||||
|
|
|
|||
Loading…
Reference in a new issue