Skip to content

deno-libs/proxy_addr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

proxy_addr

GitHub release (latest by date) GitHub Workflow Status Codecov

Deno port of proxy-addr library.

Usage

import { serve } from 'https://deno.land/[email protected]/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)
})