feat: implement MoloApp plans 01-15 with integration
Full C++23 framework tree: runtime, observability, security, data, app, realtime, supervisor, clients, CLI, example plus enterprise tenancy, audit, operability, governance, supplychain. Postgres via docker compose for tests.
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "csp/csp_policy.hpp"
|
||||
|
||||
namespace molo::csp {
|
||||
|
||||
// Fluent builder. Default is deny-first per 09-cli-ops.md rule 10.
|
||||
class CspBuilder {
|
||||
public:
|
||||
CspBuilder();
|
||||
|
||||
CspBuilder& default_src(const std::string& value);
|
||||
CspBuilder& script_src(const std::string& value);
|
||||
CspBuilder& style_src(const std::string& value);
|
||||
CspBuilder& img_src(const std::string& value);
|
||||
CspBuilder& connect_src(const std::string& value);
|
||||
CspBuilder& frame_ancestors(const std::string& value);
|
||||
CspBuilder& report_to(const std::string& value);
|
||||
CspBuilder& script_nonce(const std::string& nonce_base64);
|
||||
CspBuilder& enforce();
|
||||
|
||||
CspPolicy build() const;
|
||||
|
||||
private:
|
||||
std::map<std::string, std::string> directives_;
|
||||
bool report_only_ = true;
|
||||
};
|
||||
|
||||
} // namespace molo::csp
|
||||
Reference in New Issue
Block a user