fix(transport): allow passwordless resource reads
This commit is contained in:
@@ -55,8 +55,9 @@ export class SafeUpstreamGateway {
|
||||
url.hash ||
|
||||
url.username ||
|
||||
url.password ||
|
||||
typeof request.headers.cookie !== 'string' ||
|
||||
!/^simadmin_session=[^;\s,]+$/.test(request.headers.cookie)
|
||||
(request.headers.cookie !== undefined &&
|
||||
(typeof request.headers.cookie !== 'string' ||
|
||||
!/^simadmin_session=[^;\s,]+$/.test(request.headers.cookie)))
|
||||
)
|
||||
throw new UpstreamError('UPSTREAM_REQUEST_INVALID');
|
||||
return this.options.transport.get(request.url, request.headers);
|
||||
|
||||
Reference in New Issue
Block a user