mirror of
https://github.com/caprover/caprover
synced 2026-05-29 14:50:55 +00:00
Moved to headers
This commit is contained in:
@@ -95,8 +95,10 @@ export function injectUser() {
|
||||
*/
|
||||
export function injectUserForBuildTrigger() {
|
||||
return function (req: Request, res: Response, next: NextFunction) {
|
||||
const token = req.query.token as string
|
||||
const namespace = req.query.namespace as string
|
||||
const locals = res.locals
|
||||
|
||||
const token = req.header(CaptainConstants.headerAppToken) as string
|
||||
const namespace = locals.namespace
|
||||
const appName = req.params.appName as string
|
||||
|
||||
if (!token || !namespace || !appName) {
|
||||
|
||||
@@ -157,6 +157,8 @@ let data = {
|
||||
|
||||
headerAuth: 'x-captain-auth',
|
||||
|
||||
headerAppToken: 'x-captain-app-token',
|
||||
|
||||
headerNamespace: 'x-namespace',
|
||||
|
||||
// ********************* ETC ************************
|
||||
|
||||
Reference in New Issue
Block a user