How to use the http-status-codes.TEMPORARY_REDIRECT function in http-status-codes

To help you get started, we’ve selected a few http-status-codes examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github electrode-io / electrode / packages / electrode-react-webapp / lib / http-status.js View on Github external
"use strict";

const HttpStatusCodes = require("http-status-codes");

module.exports = {
  // Status codes where we want to redirect the user
  redirect: {
    [HttpStatusCodes.MOVED_PERMANENTLY]: true,
    [HttpStatusCodes.MOVED_TEMPORARILY]: true,
    [HttpStatusCodes.PERMANENT_REDIRECT]: true,
    [HttpStatusCodes.TEMPORARY_REDIRECT]: true
  }
};
github AceMetrix / connect-cas / lib / authenticate.js View on Github external
return function(req, res, next){
        if (req.session && req.session.st){
            // refresh the expiration if ssout
            if (req.ssout) {
                req.sessionStore.set(req.session.st, req.session.id);
            }
            next();
            return;
        }
        options.pathname = options.paths.login;
        options.query = options.query || {};
        options.query.service = origin(req);
        res.redirect(HttpStatus.TEMPORARY_REDIRECT, url.format(options));
    };
};
github OliverJAsh / express-result-types / src / result.ts View on Github external
export const TemporaryRedirect = (url: string): Result =>
    Redirect(url, HttpStatusCodes.TEMPORARY_REDIRECT);
github AceMetrix / connect-cas / lib / proxy-ticket.js View on Github external
function redirectToLogin(options, req, res){
    options.pathname = options.paths.login;
    options.query = {};
    options.query.service = origin(req);
    res.redirect(HttpStatus.TEMPORARY_REDIRECT, url.format(options));
}
github Prior99 / hyrest / packages / hyrest / src / answers.ts View on Github external
export function temporaryRedirect(arg1: T | string | Wrapper, arg2?: string): T {
    return answer(HTTP.TEMPORARY_REDIRECT, arg1, arg2);
}