Moved to headers

This commit is contained in:
Kasra Bigdeli
2021-08-01 17:52:48 -07:00
parent 21ecc92129
commit 7f52fd5dd0
2 changed files with 6 additions and 2 deletions
+4 -2
View File
@@ -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) {
+2
View File
@@ -157,6 +157,8 @@ let data = {
headerAuth: 'x-captain-auth',
headerAppToken: 'x-captain-app-token',
headerNamespace: 'x-namespace',
// ********************* ETC ************************