0.2.1
Deno port of `proxy-addr` library
Attributes
Includes Deno configuration
Repository
Current version released
a year ago
Dependencies
deno.land/x
proxy_addr
Deno port of proxy-addr library.
Usage
import { serve } from 'https://deno.land/std@0.185.0/http/server.ts'
import {
proxyaddr,
RequestWithConnection,
} from 'https://deno.land/x/proxy_addr/mod.ts'
await serve((req, conn) => {
const request = req as RequestWithConnection
request.conn = conn
const res = proxyaddr(request, ['127.0.0.1'])
return new Response(res)
})