Seastar
High performance C++ framework for concurrent servers
|
content_replace replaces variable in a file with a dynamic value. It would take the host from request and will replace the variable in a file
The replacement can be restricted to an extension.
We are currently support only one file type for replacement. It could be extend if we will need it
#include <seastar/http/transformers.hh>
Public Member Functions | |
virtual output_stream< char > | transform (std::unique_ptr< http::request > req, const sstring &extension, output_stream< char > &&s) |
content_replace (const sstring &extension="") | |
|
inlineexplicit |
the constructor get the file extension the replace would work on.
extension | file extension, when not set all files extension |
|
virtual |
Any file transformer should implement this method.
req | the request |
extension | the file extension originating the content returns a new output stream to be used when writing the file to the reply |
Implements seastar::httpd::file_transformer.