Set proxy setting on Koa application.
This commit is contained in:
parent
f4aeb801d2
commit
26f2deb234
|
@ -198,6 +198,8 @@ export class FlagSet<V extends Flag<any>, T extends { [key: string]: V }> {
|
|||
let userId = identity?._id
|
||||
if (!userId) {
|
||||
const ip = context.getIP()
|
||||
// TODO; REMOVE THIS
|
||||
tags["userIP"] = ip
|
||||
if (ip) {
|
||||
userId = crypto.createHash("sha512").update(ip).digest("hex")
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ import { userAgent } from "koa-useragent"
|
|||
|
||||
export default function createKoaApp() {
|
||||
const app = new Koa()
|
||||
app.proxy = true
|
||||
|
||||
let mbNumber = parseInt(env.HTTP_MB_LIMIT || "10")
|
||||
if (!mbNumber || isNaN(mbNumber)) {
|
||||
|
|
|
@ -46,6 +46,7 @@ bootstrap()
|
|||
const app: Application = new Application()
|
||||
|
||||
app.keys = ["secret", "key"]
|
||||
app.proxy = true
|
||||
|
||||
// set up top level koa middleware
|
||||
app.use(handleScimBody)
|
||||
|
|
Loading…
Reference in New Issue