File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ function isCloudflareConfigured(): boolean {
1919 return ! ! (
2020 process . env . CLOUDFLARE_ZONE_ID &&
2121 process . env . CLOUDFLARE_API_TOKEN &&
22- process . env . PUBLIC_URL
22+ process . env . API_URL
2323 ) ;
2424}
2525
@@ -99,16 +99,16 @@ export async function purgeCloudflareCache(urls: string[]): Promise<boolean> {
9999 * @param slug - The public note slug
100100 */
101101export async function purgePublicNoteCache ( slug : string ) : Promise < boolean > {
102- const publicUrl = process . env . PUBLIC_URL ;
103- if ( ! publicUrl ) {
104- logger . debug ( "[CLOUDFLARE] PUBLIC_URL not configured, skipping cache purge" ) ;
102+ const apiUrl = process . env . API_URL ;
103+ if ( ! apiUrl ) {
104+ logger . debug ( "[CLOUDFLARE] API_URL not configured, skipping cache purge" ) ;
105105 return true ;
106106 }
107107
108108 // Purge both the API endpoint and any potential frontend route
109109 const urls = [
110- `${ publicUrl } /api/public-notes/${ slug } ` ,
111- `${ publicUrl } /p/${ slug } ` , // Frontend route if exists
110+ `${ apiUrl } /api/public-notes/${ slug } ` ,
111+ `${ apiUrl } /p/${ slug } ` , // Frontend route if exists
112112 ] ;
113113
114114 return purgeCloudflareCache ( urls ) ;
You can’t perform that action at this time.
0 commit comments