Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DojoBackendAPI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dojo Project (HES-SO)
Projects
Backend
DojoBackendAPI
Commits
54b27f2d
Commit
54b27f2d
authored
1 year ago
by
joel.vonderwe
Committed by
michael.minelli
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Return error when client headers are missing
parent
6f9a561e
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!3
Return error when client headers are missing (issue #19)
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ExpressAPI/src/middlewares/ClientVersionCheckerMiddleware.ts
+2
-0
2 additions, 0 deletions
ExpressAPI/src/middlewares/ClientVersionCheckerMiddleware.ts
ExpressAPI/src/shared
+1
-1
1 addition, 1 deletion
ExpressAPI/src/shared
with
3 additions
and
1 deletion
ExpressAPI/src/middlewares/ClientVersionCheckerMiddleware.ts
+
2
−
0
View file @
54b27f2d
...
@@ -26,6 +26,8 @@ class ClientVersionCheckerMiddleware {
...
@@ -26,6 +26,8 @@ class ClientVersionCheckerMiddleware {
}
}
new
Session
().
sendResponse
(
res
,
HttpStatusCode
.
MethodNotAllowed
,
{},
`Unsupported client.`
,
DojoStatusCode
.
CLIENT_NOT_SUPPORTED
);
new
Session
().
sendResponse
(
res
,
HttpStatusCode
.
MethodNotAllowed
,
{},
`Unsupported client.`
,
DojoStatusCode
.
CLIENT_NOT_SUPPORTED
);
}
else
{
new
Session
().
sendResponse
(
res
,
HttpStatusCode
.
MethodNotAllowed
,
{},
`Missing client headers.`
,
DojoStatusCode
.
CLIENT_HEADER_MISSING
);
}
}
};
};
}
}
...
...
This diff is collapsed.
Click to expand it.
shared
@
7c5131a6
Compare
75fedb26
...
7c5131a6
Subproject commit 7
5fedb26c47bb6f707725307a79a45a13e62496d
Subproject commit 7
c5131a6ce0f314b69cf14a2ab5b59c9c68bb781
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment