No, it's in SSR on next-on-pages that I call the RPC function getEnvironmentVariable, but I'm compar

No, it's in SSR on next-on-pages that I call the RPC function getEnvironmentVariable, but I'm comparing Date.now() right before and right after the RPC call, which I then log into a log aggregator, and the implementation of the RPC function in the WorkerEntrypoint of that worker is:

/** Edge Config Worker */
export default class extends WorkerEntrypoint<EdgeConfigEnv> {
  async setEnvironmentVariable(name: string, value: string): Promise<boolean> {
     const res = await fetch(..., {}); // Simple POST call to `/workers/scripts/${scriptName}/secrets`
  }

  getEnvironmentVariable(name: string): string | null {
    if (typeof this.env[name] === "string") {
      return this.env[name];
    }

    return null;
  }
}
Was this page helpful?