Donner 0.5.1
Embeddable browser-grade SVG2 engine
Loading...
Searching...
No Matches
donner::editor::sandbox::SvgSourceOptions Struct Reference

Configuration knobs for a SvgSource. Defaults match the design doc's address-bar section: 100 MB cap on local files. More...

#include "donner/editor/sandbox/SvgSource.h"

Public Attributes

std::filesystem::path baseDirectory = std::filesystem::current_path()
 Directory used to resolve relative paths. Defaults to the current working directory at SvgSource construction time.
std::size_t maxFileBytes = 100u * 1024u * 1024u
 Maximum number of bytes the loader will read from a single file. The cap exists to keep a malicious or runaway path from exhausting memory before the sandbox even sees the bytes.
std::size_t maxHttpBytes = 10u * 1024u * 1024u
 Maximum number of bytes to accept from an HTTP(S) response.
int httpTimeoutSeconds = 10
 Timeout in seconds for HTTP(S) fetches.
int maxRedirects = 5
 Maximum number of redirects to follow for HTTP(S) fetches.

Detailed Description

Configuration knobs for a SvgSource. Defaults match the design doc's address-bar section: 100 MB cap on local files.

Member Data Documentation

◆ baseDirectory

std::filesystem::path donner::editor::sandbox::SvgSourceOptions::baseDirectory = std::filesystem::current_path()

Directory used to resolve relative paths. Defaults to the current working directory at SvgSource construction time.

◆ httpTimeoutSeconds

int donner::editor::sandbox::SvgSourceOptions::httpTimeoutSeconds = 10

Timeout in seconds for HTTP(S) fetches.

◆ maxFileBytes

std::size_t donner::editor::sandbox::SvgSourceOptions::maxFileBytes = 100u * 1024u * 1024u

Maximum number of bytes the loader will read from a single file. The cap exists to keep a malicious or runaway path from exhausting memory before the sandbox even sees the bytes.

◆ maxHttpBytes

std::size_t donner::editor::sandbox::SvgSourceOptions::maxHttpBytes = 10u * 1024u * 1024u

Maximum number of bytes to accept from an HTTP(S) response.

◆ maxRedirects

int donner::editor::sandbox::SvgSourceOptions::maxRedirects = 5

Maximum number of redirects to follow for HTTP(S) fetches.


The documentation for this struct was generated from the following file: