We need a plugin/module for major webservers (at least nginx,apache,IIS) that allows to alter html pages before they are sent to clients. In particular we need to recognize some scripts or iframe in the page, based on their content, and to add or alter some attributes of the corresponding tags.
Given the following script
src="[login to view URL]****"
We need to recognize that it contains the string “[login to view URL]” and change it as follows:
data-src="[login to view URL]****"
Existing plugins like nginx_substitutions_filter for nginx are not enough because they are not able to process multiple lines. The strings that we need to recognize will be stored in a dictionary file. The example above is only one of the possible cases, we need to extend it for all possible scripts. This kind of “extension” can be written by us but we need at least the “basic” replacement plugin. For the “extension” the possibility to insert a function, in a configuration file or directly in the source code of the plugin, should be enough. The plugin should be as efficient as possible, to minimize the delay introduced in all the pages served by the webserver.