Releases: BackendStack21/fast-gateway
Releases · BackendStack21/fast-gateway
Updating dependencies
Changes:
fast-proxy
was updated to latest version (added:authority
HTTP2 header support!)
Adding urlRewrite hook
We added a new urlRewrite
hook that simplifies URL rewrites using req path or queryString params:
'use strict'
const gateway = require('../index')
const PORT = process.env.PORT || 8080
gateway({
routes: [{
pathRegex: '',
prefix: '/customers/:customerId',
target: 'http://localhost:3000',
urlRewrite: ({ params: { customerId } }) => `/users/${customerId}`
}]
}).start(PORT).then(server => {
console.log(`API Gateway listening on ${PORT} port!`)
})
const service = require('restana')({})
service
.get('/users/:id', (req, res) => res.send('Hello ' + req.params.id))
.start(3000).then(() => console.log('Service listening on 3000 port!'))
Issue ref: #58
Updating dependencies
Updating dependencies to latest version.
Updating fast-proxy to v1.8.0
Changes:
- Updating
fast-proxy
to latest version to fix a potential SSRF bug. More details: fastify/fast-proxy#44 - Prior versions to v2.7.0 will be marked as deprecated.
Updating dependencies
DEV and PROD dependencies were updated to latest versions!
Hostnames support
Changes:
- Introducing hostnames support: https://github.com/jkyberneees/fast-gateway#hostnames-support
- Updating dev dependencies
Issue ref: #51
Fixes TS definition
Added:
- Fixes TS definition for
server
parameter. restana
dependency was updated to latest version.
Closes: #50
Updating dependencies
Changes:
- Dependencies were updated to latest versions.
- We now use Node.js version 10, 12 and 14 for testing on Travis CI
Support req.query forwarding
Changes:
- The
req.query
object is forwarded to the origin if thequeryString
parameter is missing route hooks. PR: #48 - Support and Donate section was added to the README.md
- Dependencies were updated to latest versions
Updating dependencies
Changes:
- Dependencies were updated to latest version.
- Articles section in
README.md
was updated.