File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " labelzoom-cf-api-proxy" ,
33 "description" : " A Cloudflare Worker that serves as a reverse proxy for LabelZoom's public REST API" ,
4- "version" : " 1.1.2 " ,
4+ "version" : " 1.1.3 " ,
55 "private" : true ,
66 "dependencies" : {
77 "hono" : " 4.7.7" ,
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ app.notFound((c) => {
100100 return proxyToBackend ( {
101101 baseUrl : c . env . LZ_PROD_API_BASE_URL ,
102102 headers : {
103- 'X-LZ-IP' : c . req . header ( "Cf -Connecting-Ip " ) || c . req . header ( "X-Forwarded-For" ) || '' ,
103+ 'X-LZ-IP' : c . req . header ( "CF -Connecting-IP " ) || c . req . header ( "X-Forwarded-For" ) || '' ,
104104 'X-LZ-Secret-Key' : c . env . LZ_PROD_API_SECRET_KEY ,
105105 } ,
106106 } ) ( c ) ;
Original file line number Diff line number Diff line change @@ -15,7 +15,9 @@ export const forceRelativeRedirects = (): MiddlewareHandler => {
1515 const url = new URL ( locationHeader ) ; // throws TypeError if not a full URL
1616
1717 // URL parsed successfully, it's an absolute redirect rather than relative
18- c . res . headers . set ( 'Location' , url . pathname + url . search ) ;
18+ if ( / \. ? l a b e l z o o m .n e t $ / . test ( url . host ) ) {
19+ c . res . headers . set ( 'Location' , url . pathname + url . search ) ;
20+ }
1921 } catch {
2022 // failed to parse location header as URL, it's already a relative redirect (so do nothing)
2123 }
You can’t perform that action at this time.
0 commit comments