mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-02-28 21:19:42 +00:00
fix: add comic-page to auth bypass patterns
Like covers and author images, comic pages need to be accessible without authentication for img src to work.
This commit is contained in:
parent
c6c8b378ab
commit
c7d4a0cba8
1 changed files with 5 additions and 1 deletions
|
|
@ -18,7 +18,11 @@ const { escapeRegExp } = require('./utils')
|
|||
class Auth {
|
||||
constructor() {
|
||||
const escapedRouterBasePath = escapeRegExp(global.RouterBasePath)
|
||||
this.ignorePatterns = [new RegExp(`^(${escapedRouterBasePath}/api)?/items/[^/]+/cover$`), new RegExp(`^(${escapedRouterBasePath}/api)?/authors/[^/]+/image$`)]
|
||||
this.ignorePatterns = [
|
||||
new RegExp(`^(${escapedRouterBasePath}/api)?/items/[^/]+/cover$`),
|
||||
new RegExp(`^(${escapedRouterBasePath}/api)?/authors/[^/]+/image$`),
|
||||
new RegExp(`^(${escapedRouterBasePath}/api)?/items/[^/]+/comic-page/[0-9]+`)
|
||||
]
|
||||
|
||||
/** @type {import('express-rate-limit').RateLimitRequestHandler} */
|
||||
this.authRateLimiter = RateLimiterFactory.getAuthRateLimiter()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue