Module content_rewrite

Module content_rewrite 

Source
Expand description

Content rewriting module for path-based routing

This module handles rewriting absolute paths in response content to include the tunnel ID prefix. This is necessary for path-based routing where the tunnel ID is part of the URL path.

For example, if a tunnel ID is “abc123” and the local service returns HTML with href="/api/users", it needs to be rewritten to href="/abc123/api/users" so that the browser sends requests to the correct tunnel path.

Enums§

RewriteStrategy
Strategy for rewriting content

Functions§

rewrite_response_content
Main entry point for content rewriting
should_rewrite_content
Check if content type should be rewritten