Repository
Current version released
2 years ago
Dependencies
std
forwarded
Deno port of forwarded library.
Usage
import { serve } from 'https://deno.land/std@0.185.0/http/server.ts'
import { forwarded, parse } from 'https://deno.land/x/forwarded/mod.ts'
await serve((req) => new Response(JSON.stringify(forwarded(req)), { port: 8080 })
API
forwarded(req)
Get all addresses in the request, using the X-Forwarded-For
header.
parse(header)
Parse the X-Forwarded-For header.