Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
koa-redirect-loop
Advanced tools
Prevent redirect loops with sessions since HTTP referrer header is unreliable and ensures sessions are saved upon redirect
Prevent redirect loops with sessions since HTTP referrer header is unreliable and ensures sessions are saved upon redirect
Note that this package only supports
koa-generic-session
, since other packages do not expose a save method used inres.end
override.
npm:
npm install koa-redirect-loop
const Koa = require('koa');
const session = require('koa-generic-session');
const RedirectLoop = require('koa-redirect-loop');
const redirectLoop = new RedirectLoop({
defaultPath: '/',
maxRedirects: 5,
logger: console
});
const app = new Koa();
app.keys = [ 'secret' ];
app.use(session());
app.use(redirectLoop.middleware);
getDefaultPath
(Function) - function which accepts ctx
argument and returns a path to fallback to, defaults to either /${ctx.request.locale}
(e.g. if using @ladjs/i18n
) or /
defaultPath
(String) - path to fallback to, defaults to '/'
maxRedirects
(Number) - maximum number of redirects to allow, defaults to 5
console
(Object) - a logger instance, defaults to console
Name | Website |
---|---|
Nick Baugh | http://niftylettuce.com/ |
FAQs
Prevent redirect loops with sessions since HTTP referrer header is unreliable and ensures sessions are saved upon redirect
The npm package koa-redirect-loop receives a total of 0 weekly downloads. As such, koa-redirect-loop popularity was classified as not popular.
We found that koa-redirect-loop 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
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.