mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-27 01:36:30 +02:00
fix(web): allow public invite info fetches
This commit is contained in:
parent
a818c3b4d0
commit
64a9ad1f22
1 changed files with 2 additions and 1 deletions
|
|
@ -91,7 +91,8 @@ class BaseApiService {
|
|||
// Validate the bearer token
|
||||
const isNoAuthEndpoint =
|
||||
this.noAuthEndpoints.includes(url) ||
|
||||
this.noAuthPrefixes.some((prefix) => url.startsWith(prefix));
|
||||
this.noAuthPrefixes.some((prefix) => url.startsWith(prefix)) ||
|
||||
/^\/api\/v1\/invites\/[^/]+\/info$/.test(url);
|
||||
if (!this.bearerToken && !isNoAuthEndpoint) {
|
||||
throw new AuthenticationError("You are not authenticated. Please login again.");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue