22 lines
489 B
C++
22 lines
489 B
C++
#pragma once
|
|
|
|
#include <filesystem>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
namespace connector {
|
|
|
|
struct ConnectorConfig {
|
|
std::vector<std::string> allowed_origins;
|
|
std::string spine_executable;
|
|
};
|
|
|
|
std::filesystem::path config_path();
|
|
ConnectorConfig load_config();
|
|
void save_config(const ConnectorConfig& config);
|
|
bool origin_allowed(const std::string& origin);
|
|
void allow_origin(const std::string& origin);
|
|
bool valid_web_origin(const std::string& origin);
|
|
|
|
} // namespace connector
|