Skip to content

turinggroup/serverless-express-custom-domain-middleware

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Serverless Express Custom Domain Middleware

install

npm install @turinggroup/serverless-express-custom-domain-middleware

usage

const customDomainReroute = require('@turinggroup/serverless-express-custom-domain-middleware').customDomainReroute;

app.use(customDomainReroute);

to call custom function when path is rerouted

const customDomainReroute = require('@turinggroup/serverless-express-custom-domain-middleware');
const rerouter = customDomainReroute.setup({
  onRouted: (originalPath, routedPath) => {
    // do something here
  }
});

app.use(rerouter);

About

matches request urls when basepath in api-gateway and custom domain mismatch

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •