Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
697a08167f | ||
|
|
017c69abb0 | ||
|
|
75a7279ea2 | ||
|
|
d53ffca5db |
@@ -1,3 +1,10 @@
|
|||||||
|
## [2.7.2](https://github.com/fallenbagel/jellyseerr/compare/v2.7.1...v2.7.2) (2025-07-21)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **proxy:** modify the registration of the axios interceptors ([#1791](https://github.com/fallenbagel/jellyseerr/issues/1791)) ([75a7279](https://github.com/fallenbagel/jellyseerr/commit/75a7279ea24874548fece12bb5e7c97d78d088a9)), closes [#1787](https://github.com/fallenbagel/jellyseerr/issues/1787)
|
||||||
|
|
||||||
## [2.7.1](https://github.com/fallenbagel/jellyseerr/compare/v2.7.0...v2.7.1) (2025-07-15)
|
## [2.7.1](https://github.com/fallenbagel/jellyseerr/compare/v2.7.0...v2.7.1) (2025-07-15)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ kubeVersion: ">=1.23.0-0"
|
|||||||
name: jellyseerr-chart
|
name: jellyseerr-chart
|
||||||
description: Jellyseerr helm chart for Kubernetes
|
description: Jellyseerr helm chart for Kubernetes
|
||||||
type: application
|
type: application
|
||||||
version: 2.6.0
|
version: 2.6.1
|
||||||
appVersion: "2.7.0"
|
appVersion: "2.7.1"
|
||||||
maintainers:
|
maintainers:
|
||||||
- name: Jellyseerr
|
- name: Jellyseerr
|
||||||
url: https://github.com/Fallenbagel/jellyseerr
|
url: https://github.com/Fallenbagel/jellyseerr
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# jellyseerr-chart
|
# jellyseerr-chart
|
||||||
|
|
||||||
  
|
  
|
||||||
|
|
||||||
Jellyseerr helm chart for Kubernetes
|
Jellyseerr helm chart for Kubernetes
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "jellyseerr",
|
"name": "jellyseerr",
|
||||||
"version": "2.7.1",
|
"version": "2.7.2",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"preinstall": "npx only-allow pnpm",
|
"preinstall": "npx only-allow pnpm",
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { requestInterceptorFunction } from '@server/utils/customProxyAgent';
|
||||||
import type { AxiosInstance, AxiosRequestConfig } from 'axios';
|
import type { AxiosInstance, AxiosRequestConfig } from 'axios';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import rateLimit from 'axios-rate-limit';
|
import rateLimit from 'axios-rate-limit';
|
||||||
@@ -37,8 +38,7 @@ class ExternalAPI {
|
|||||||
...options.headers,
|
...options.headers,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
this.axios.interceptors.request = axios.interceptors.request;
|
this.axios.interceptors.request.use(requestInterceptorFunction);
|
||||||
this.axios.interceptors.response = axios.interceptors.response;
|
|
||||||
|
|
||||||
if (options.rateLimit) {
|
if (options.rateLimit) {
|
||||||
this.axios = rateLimit(this.axios, {
|
this.axios = rateLimit(this.axios, {
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import type { User } from '@server/entity/User';
|
import type { User } from '@server/entity/User';
|
||||||
import type { TautulliSettings } from '@server/lib/settings';
|
import type { TautulliSettings } from '@server/lib/settings';
|
||||||
import logger from '@server/logger';
|
import logger from '@server/logger';
|
||||||
|
import { requestInterceptorFunction } from '@server/utils/customProxyAgent';
|
||||||
import type { AxiosInstance } from 'axios';
|
import type { AxiosInstance } from 'axios';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { uniqWith } from 'lodash';
|
import { uniqWith } from 'lodash';
|
||||||
@@ -123,8 +124,7 @@ class TautulliAPI {
|
|||||||
}${settings.urlBase ?? ''}`,
|
}${settings.urlBase ?? ''}`,
|
||||||
params: { apikey: settings.apiKey },
|
params: { apikey: settings.apiKey },
|
||||||
});
|
});
|
||||||
this.axios.interceptors.request = axios.interceptors.request;
|
this.axios.interceptors.request.use(requestInterceptorFunction);
|
||||||
this.axios.interceptors.response = axios.interceptors.response;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public async getInfo(): Promise<TautulliInfo> {
|
public async getInfo(): Promise<TautulliInfo> {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import logger from '@server/logger';
|
import logger from '@server/logger';
|
||||||
|
import { requestInterceptorFunction } from '@server/utils/customProxyAgent';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import rateLimit, { type rateLimitOptions } from 'axios-rate-limit';
|
import rateLimit, { type rateLimitOptions } from 'axios-rate-limit';
|
||||||
import { createHash } from 'crypto';
|
import { createHash } from 'crypto';
|
||||||
@@ -150,8 +151,7 @@ class ImageProxy {
|
|||||||
baseURL: baseUrl,
|
baseURL: baseUrl,
|
||||||
headers: options.headers,
|
headers: options.headers,
|
||||||
});
|
});
|
||||||
this.axios.interceptors.request = axios.interceptors.request;
|
this.axios.interceptors.request.use(requestInterceptorFunction);
|
||||||
this.axios.interceptors.response = axios.interceptors.response;
|
|
||||||
|
|
||||||
if (options.rateLimitOptions) {
|
if (options.rateLimitOptions) {
|
||||||
this.axios = rateLimit(this.axios, options.rateLimitOptions);
|
this.axios = rateLimit(this.axios, options.rateLimitOptions);
|
||||||
|
|||||||
@@ -1,11 +1,15 @@
|
|||||||
import type { ProxySettings } from '@server/lib/settings';
|
import type { ProxySettings } from '@server/lib/settings';
|
||||||
import logger from '@server/logger';
|
import logger from '@server/logger';
|
||||||
import axios from 'axios';
|
import axios, { type InternalAxiosRequestConfig } from 'axios';
|
||||||
import { HttpProxyAgent } from 'http-proxy-agent';
|
import { HttpProxyAgent } from 'http-proxy-agent';
|
||||||
import { HttpsProxyAgent } from 'https-proxy-agent';
|
import { HttpsProxyAgent } from 'https-proxy-agent';
|
||||||
import type { Dispatcher } from 'undici';
|
import type { Dispatcher } from 'undici';
|
||||||
import { Agent, ProxyAgent, setGlobalDispatcher } from 'undici';
|
import { Agent, ProxyAgent, setGlobalDispatcher } from 'undici';
|
||||||
|
|
||||||
|
export let requestInterceptorFunction: (
|
||||||
|
config: InternalAxiosRequestConfig
|
||||||
|
) => InternalAxiosRequestConfig;
|
||||||
|
|
||||||
export default async function createCustomProxyAgent(
|
export default async function createCustomProxyAgent(
|
||||||
proxySettings: ProxySettings
|
proxySettings: ProxySettings
|
||||||
) {
|
) {
|
||||||
@@ -73,7 +77,8 @@ export default async function createCustomProxyAgent(
|
|||||||
axios.defaults.httpsAgent = new HttpsProxyAgent(proxyUrl, {
|
axios.defaults.httpsAgent = new HttpsProxyAgent(proxyUrl, {
|
||||||
headers: token ? { 'proxy-authorization': token } : undefined,
|
headers: token ? { 'proxy-authorization': token } : undefined,
|
||||||
});
|
});
|
||||||
axios.interceptors.request.use((config) => {
|
|
||||||
|
requestInterceptorFunction = (config) => {
|
||||||
const url = config.baseURL
|
const url = config.baseURL
|
||||||
? new URL(config.baseURL + (config.url || ''))
|
? new URL(config.baseURL + (config.url || ''))
|
||||||
: config.url;
|
: config.url;
|
||||||
@@ -82,7 +87,8 @@ export default async function createCustomProxyAgent(
|
|||||||
config.httpsAgent = false;
|
config.httpsAgent = false;
|
||||||
}
|
}
|
||||||
return config;
|
return config;
|
||||||
});
|
};
|
||||||
|
axios.interceptors.request.use(requestInterceptorFunction);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
logger.error('Failed to connect to the proxy: ' + e.message, {
|
logger.error('Failed to connect to the proxy: ' + e.message, {
|
||||||
label: 'Proxy',
|
label: 'Proxy',
|
||||||
|
|||||||
Reference in New Issue
Block a user