File tree Expand file tree Collapse file tree 5 files changed +11
-1
lines changed Expand file tree Collapse file tree 5 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,11 @@ All notable changes to the Ghost Cache Invalidation Proxy will be documented in
55The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
66and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
77
8+ ## [ 1.1.0] - 2025-09-29
9+
10+ ### Added
11+ - Configuration option for timeout
12+
813## [ 1.0.0] - 2025-03-11
914
1015### Added
Original file line number Diff line number Diff line change 11{
22 "name" : " ghost-cache-invalidation-proxy" ,
3- "version" : " 1.1 .0" ,
3+ "version" : " 1.2 .0" ,
44 "description" : " A proxy between a Ghost CMS instance and configurable webhooks for cache invalidation." ,
55 "main" : " dist/index.js" ,
66 "author" :
" Jannis Fedoruk-Betschki <[email protected] >" ,
Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ const configSchema = z.object({
4242 } ) ,
4343 WEBHOOK_RETRY_COUNT : z . string ( ) . transform ( Number ) . default ( '3' ) ,
4444 WEBHOOK_RETRY_DELAY : z . string ( ) . transform ( Number ) . default ( '1000' ) ,
45+ PROXY_TIMEOUT : z . string ( ) . transform ( Number ) . default ( '600000' ) ,
4546} ) ;
4647
4748export function loadConfig ( ) : MiddlewareConfig {
@@ -70,6 +71,7 @@ export function loadConfig(): MiddlewareConfig {
7071 retryCount : data . WEBHOOK_RETRY_COUNT ,
7172 retryDelay : data . WEBHOOK_RETRY_DELAY ,
7273 } ,
74+ proxyTimeout : data . PROXY_TIMEOUT ,
7375 security : {
7476 trustProxy : true ,
7577 }
Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ export class ProxyMiddleware {
2020 changeOrigin : true ,
2121 selfHandleResponse : true ,
2222 xfwd : true ,
23+ timeout : this . config . proxyTimeout ,
24+ proxyTimeout : this . config . proxyTimeout ,
2325 headers : {
2426 'X-Forwarded-Proto' : 'https'
2527 }
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ export interface MiddlewareConfig {
1212 retryCount : number ;
1313 retryDelay : number ;
1414 } ;
15+ proxyTimeout : number ;
1516 security : {
1617 trustProxy : boolean ;
1718 } ;
You can’t perform that action at this time.
0 commit comments