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

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

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
@turinggroup/serverless-express-custom-domain-middleware
521.1.05 years ago5 years agoMinified + gzip package size for @turinggroup/serverless-express-custom-domain-middleware in KB

Readme

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);