mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Provide a function to set 'hostname' field in log
This commit is contained in:
@@ -393,6 +393,8 @@ class Transaction : public TransactionAnchoredVariables, public TransactionSecMa
|
||||
int processLogging();
|
||||
int updateStatusCode(int status);
|
||||
|
||||
int setRequestHostName(const std::string& hostname);
|
||||
|
||||
bool intervention(ModSecurityIntervention *it);
|
||||
|
||||
bool addArgument(const std::string& orig, const std::string& key,
|
||||
@@ -443,6 +445,11 @@ class Transaction : public TransactionAnchoredVariables, public TransactionSecMa
|
||||
*/
|
||||
std::shared_ptr<std::string> m_serverIpAddress;
|
||||
|
||||
/**
|
||||
* Holds the request's hostname
|
||||
*/
|
||||
std::shared_ptr<std::string> m_requestHostName;
|
||||
|
||||
/**
|
||||
* Holds the raw URI that was requested.
|
||||
*/
|
||||
@@ -724,6 +731,9 @@ int msc_process_logging(Transaction *transaction);
|
||||
/** @ingroup ModSecurity_C_API */
|
||||
int msc_update_status_code(Transaction *transaction, int status);
|
||||
|
||||
/** @ingroup ModSecurity_C_API */
|
||||
int msc_set_request_hostname(Transaction *transaction, const unsigned char *hostname);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
} // namespace modsecurity
|
||||
|
Reference in New Issue
Block a user