mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-18 05:25:40 +09:00
fix(api): answer 403 when the client ip header is unparsable (#2483)
This commit is contained in:
1 parent
a036d9a2e1
commit
9a229c1b73
5 files changed
+109
-17
No files matched your search
@@ -21,6 +21,9 @@ interface HeadersLike {
|
||||
}
|
||||
|
||||
export class MissingClientIpError extends Error {
|
||||
readonly code = 'FORBIDDEN';
|
||||
readonly status = 403;
|
||||
|
||||
constructor() {
|
||||
super('Client IP header is required');
|
||||
this.name = 'MissingClientIpError';
|
||||
|
||||
Reference in new issue
Block a user