mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-11-20 23:51:35 +01:00
Update x-forwarded-proto to check comma separated value
This commit is contained in:
1 parent
8d9db8d103
commit
b93c3133a9
2 files changed
+13
-4
No files matched your search
@@ -19,10 +19,10 @@ describe('requestUtils', () => {
|
||||
expect(isRequestSecure(mockReq({ secure: false }))).to.equal(false)
|
||||
})
|
||||
|
||||
it('isRequestSecure uses strict x-forwarded-proto check', () => {
|
||||
it('isRequestSecure uses x-forwarded-proto', () => {
|
||||
expect(isRequestSecure(mockReq({ xForwardedProto: 'https' }))).to.equal(true)
|
||||
expect(isRequestSecure(mockReq({ xForwardedProto: 'http' }))).to.equal(false)
|
||||
expect(isRequestSecure(mockReq({ xForwardedProto: 'http, https' }))).to.equal(false)
|
||||
expect(isRequestSecure(mockReq({ xForwardedProto: 'http, https' }))).to.equal(true)
|
||||
})
|
||||
|
||||
it('getRequestProtocol returns https or http', () => {
|
||||
|
||||
Reference in new issue
Block a user