also looking at this
feat: imgx integration — on-the-fly image transforms from query params
#2264
15 files
+1118
-16
| @@ -10,7 +10,7 @@ | ||
| 10 | 10 | * |
| 11 | 11 | * The daemon's PID-GC reaps anything we miss if this process dies `kill -9`. |
| 12 | 12 | */ |
| 13 | import type { LoadBalancerConfig, PathRewrite, ProxyFrom, StaticRouteConfig } from './types' | |
| 13 | import type { ImgxOptions, LoadBalancerConfig, PathRewrite, ProxyFrom, StaticRouteConfig } from './types' | |
| 14 | 14 | import * as fs from 'node:fs' |
| 15 | 15 | import * as path from 'node:path' |
| 16 | 16 | import * as process from 'node:process' |
| @@ -36,6 +36,8 @@ export interface DaemonRunnerProxy { | ||
| 36 | 36 | path?: string |
| 37 | 37 | cleanUrls?: boolean |
| 38 | 38 | changeOrigin?: boolean |
| 39 | /** Transform image responses from imgix-style query params — see {@link ImgxOptions}. */ | |
| 40 | imgx?: boolean | ImgxOptions | |
| 39 | 41 | pathRewrites?: PathRewrite[] |
| 40 | 42 | /** Serve a local directory for this route instead of proxying. */ |
| 41 | 43 | static?: string | StaticRouteConfig |
| @@ -118,6 +120,7 @@ export async function runViaDaemon(opts: DaemonRunnerOptions): Promise<void> { | ||
| 118 | 120 | createdAt, |
| 119 | 121 | cleanUrls: p.cleanUrls, |
| 120 | 122 | changeOrigin: p.changeOrigin, |
| 123 | imgx: p.imgx, | |
| 121 | 124 | pathRewrites: p.pathRewrites, |
| 122 | 125 | static: p.static, |
| 123 | 126 | loadBalancer: p.loadBalancer, |