Skip to content

Page truncated after ESI processing #280

@shukitchan

Description

@shukitchan

I have a test page at https://esi-test-pages.netlify.app/esi-variables.html
with the right response header -

surrogate-control: content="ESI/1.0"
And here is my Worker code

import esi from "cloudflare-esi"

export default {
	async fetch(request, env, ctx): Promise<Response> {
      const url = "https://esi-test-pages.netlify.app/esi-variables.html";
      const modifiedRequest = new Request(url, request);

      const parser = new esi()
      return parser.parse(modifiedRequest)

	},
} satisfies ExportedHandler<Env>;

and the output is truncated in the middle for me after the ESI variable tag being processed.

<html lang="en">
<head><title>Test Page for ESI Variables</title></head>
<body>
<p>
Host: 
example.myaccount.workers.dev

I am wondering if I did something wrong in my test. Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions