projects
/
oweals
/
peertube.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
646cfe7
)
[Server>Middlewares>Follows] Changing error code 400 to 500
author
Jorropo
<admin@jorropo.ovh>
Fri, 27 Jul 2018 08:13:19 +0000
(10:13 +0200)
committer
Chocobozzz
<me@florianbigard.com>
Fri, 27 Jul 2018 12:12:31 +0000
(14:12 +0200)
Follows on http server is a server error not an error of the client.
server/middlewares/validators/follows.ts
patch
|
blob
|
history
diff --git
a/server/middlewares/validators/follows.ts
b/server/middlewares/validators/follows.ts
index bdf39eb9c543389b58139d87e8e5339e822b6c54..040ee1f217370708cdc0771cbdd7469f9f791608 100644
(file)
--- a/
server/middlewares/validators/follows.ts
+++ b/
server/middlewares/validators/follows.ts
@@
-14,7
+14,7
@@
const followValidator = [
(req: express.Request, res: express.Response, next: express.NextFunction) => {
// Force https if the administrator wants to make friends
if (isTestInstance() === false && CONFIG.WEBSERVER.SCHEME === 'http') {
- return res.status(
4
00)
+ return res.status(
5
00)
.json({
error: 'Cannot follow on a non HTTPS web server.'
})