Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
the mod_publisher module for Apache supports a variation on ESI ...
Quote from website:
"In addition to
<!--#include file="..."-->
and<!--#include virtual="..."-->
, mod_publisher implements a third include directive.<!--#include url="http://some.remote.url/some/path"-->
will include contents fetched from a remote URL."
The syntax is almost the same. The changes to esi.module
would be simple (see below). I'll create a diff and test behind mod_publisher next week if you are interested.
/**
* Implements hook_esi_mode().
*/
function esi_esi_mode() {
return array(
'esi' => array(
'title' => 'ESI tag',
'render' => 'esi_esi_tag',
),
'ssi' => array(
'title' => 'SSI tag',
'render' => 'esi_ssi_tag',
),
'ssiurl' => array(
'title' => 'SSI url tag (for mod_publisher)',
'render' => 'esi_ssiurl_tag',
),
);
}
/**
* Render an SSI URL tag (as used by mod_publisher)
*/
function esi_ssiurl_tag($url) {
return '<!--# include url="' . $url . '" -->';
}
Comments
Comment #0.0
Dustin@PI CreditAttribution: Dustin@PI commentedFixed formatting.
Comment #1
erikwebb CreditAttribution: erikwebb commentedWhat is the benefit of mod_publisher over the standard mod_include?
Comment #2
Dustin@PI CreditAttribution: Dustin@PI commentedmod_include will only pull in files on the current server. mod_publisher pulls in remote urls over http giving full ESI type functionality.
So using a combination of mod_proxy, mod_cache and mod_publisher you can replicate most varnish features. It's less scalable of course but you have the option of adding an auth module like mod_auth_cas giving you a caching reverse proxy with ESI that works for secure users.
Comment #3
erikwebb CreditAttribution: erikwebb commentedAh okay. Yeah, let's go ahead and get a working patch on this.
Comment #4
manarth CreditAttribution: manarth commentedFixed in 7c228465bb46dc3905dfc2fcad6ec26cc573a8a1 - thanks!
Comment #5.0
(not verified) CreditAttribution: commentedremoved broken url link