Skip to content

rejetto/reverse-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

reverse-proxy

HFS plugin to proxy configured paths to other servers

image

HFS ~ HTTP File Server https://github.com/rejetto/hfs

Messing with forwarded requests

On every forwarded request, this plugin is calling customApi reverseproxy_forward. If your code/plugin exports this customApi, you can interact with it.

exports.customApi =  {
    reverseproxy_forward({ forward, ctx }) {
        // here you can see and modify the request we are about to forward
        console.log(forward)
        // forward is an object { url, method, headers, body }
        // if you change its content, it will affect forwarded request.
    }
}

About

HFS plugin to proxy configured paths to other servers

Topics

Resources

License

Stars

Watchers

Forks