Skip to content

How to modify HTTP response body? #19

@soraliu

Description

@soraliu

I found that there are a lot of materials about modifying HTTP response headers. I want to inject some static codes into the HTTP response body, and how can I do it?

<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width" />
    <title>title</title>
  </head>
  <body>
    body
  </body>
</html>

I want to inject some codes into HTML.

<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width" />
    <title>title</title>
    <!-- the following codes are injected by envoy-filter -->
    <meta name="custom" content="value" />
  </head>
  <body>
    body
  </body>
</html>

I would be very appreciative if somebody can help me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions