kopia lustrzana https://github.com/c9/core
pull out redirect into a separate plugin
rodzic
7e1613d4ab
commit
7d8062ddbf
|
@ -5,7 +5,9 @@ define(function(require, exports, module) {
|
|||
"session",
|
||||
"db",
|
||||
"c9.login",
|
||||
"preview.handler"
|
||||
"preview.handler",
|
||||
"user-content.redirect",
|
||||
"connect.remote-address"
|
||||
];
|
||||
main.provides = [];
|
||||
return main;
|
||||
|
@ -18,6 +20,7 @@ define(function(require, exports, module) {
|
|||
var db = imports.db;
|
||||
var ensureLoggedIn = imports["c9.login"].ensureLoggedIn();
|
||||
var handler = imports["preview.handler"];
|
||||
var userContent = imports["user-content.redirect"];
|
||||
|
||||
var frontdoor = require("frontdoor");
|
||||
var error = require("http-error");
|
||||
|
@ -34,6 +37,8 @@ define(function(require, exports, module) {
|
|||
next();
|
||||
});
|
||||
|
||||
api.use(userContent.redirectPreview());
|
||||
|
||||
session.use(api);
|
||||
|
||||
api.get("/:username/:projectname/:path*", {
|
||||
|
|
Ładowanie…
Reference in New Issue