Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
feathers-forward
Advanced tools
A Feathers service addapter for forwarding messages to another feathers application
A Feathers forward service adapter. Supports only rest
provider for now.
$ npm install --save feathers-forward
configure(options)
Configure Feathers application to forward all unknown services to remote server.
Options:
uri
(required) - Uri to remote serverendpoint
- Type of endpoint, for now support feathers
(not specified === feathers
) and everything else is default behaviour of request parsingreqHeaders
- Headers to forward from REST req object (case sensitive)resHeaders
- Headers to be added to REST res object from forwarded response (case sensitive)Here's a example of configuration.
const compress = require('compression');
const helmet = require('helmet');
const cors = require('cors');
const feathers = require('@feathersjs/feathers');
const configuration = require('@feathersjs/configuration');
const express = require('@feathersjs/express');
const forwardMiddleware = require('feathers-forward').middleware;
const forwardConfigure = require('feathers-forward').configure;
const middleware = require('./middleware');
const services = require('./services');
const app = express(feathers());
// Load app configuration
app.configure(configuration());
// Enable security, CORS, compression, favicon and body parsing
app.use(helmet());
app.use(cors());
app.use(compress());
app.use(express.json());
app.use(express.urlencoded({extended: true}));
// Set up Plugins and providers
app.configure(express.rest());
// Configure other middleware (see `middleware/index.js`)
app.configure(middleware);
app.configure(forwardMiddleware); // IMPORTANT
// Set up our services (see `services/index.js`)
app.configure(services);
// Forward everything else
app.configure(forwardConfigure({ // IMPORTANT
uri: 'https://example.com',
endpoint: 'feathers',
reqHeaders: ['authorization'],
resHeaders: ['custom-header']
}));
// Configure a middleware for 404s and the error handler
app.use(express.notFound());
app.use(express.errorHandler({logger}));
FAQs
A Feathers service addapter for forwarding messages to another feathers application
We found that feathers-forward demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.