forwarded
Deno port of forwarded library.
Usage
import { serve } from 'https://deno.land/std@0.88.0/http/server.ts'
import { forwarded, parse } from 'https://deno.land/x/deno-libs/forwarded/mod.ts'
const s = await serve({ port: 3000 })
for await (const req of s) {
console.log(forwarded(s))
}
API
forwarded(req)
Get all addresses in the request, using the X-Forwarded-For
header.
parse(header)
Parse the X-Forwarded-For header.