mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 02:09:37 +02:00
Add SSRF protection
This commit is contained in:
parent
af9f20d60c
commit
d24d221550
21 changed files with 160 additions and 43 deletions
|
@ -1,14 +1,14 @@
|
|||
import type { S3Client } from '@aws-sdk/client-s3'
|
||||
import { logger } from '@server/helpers/logger.js'
|
||||
import { isProxyEnabled } from '@server/helpers/proxy.js'
|
||||
import { getAgent } from '@server/helpers/requests.js'
|
||||
import { getProxyAgent } from '@server/helpers/requests.js'
|
||||
import { CONFIG } from '@server/initializers/config.js'
|
||||
import { lTags } from './logger.js'
|
||||
|
||||
async function getProxyRequestHandler () {
|
||||
if (!isProxyEnabled()) return null
|
||||
|
||||
const { agent } = getAgent()
|
||||
const { agent } = getProxyAgent()
|
||||
|
||||
const { NodeHttpHandler } = await import('@smithy/node-http-handler')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue