Skip to content
API Documentation
BastionGuard™
BlockPage Namespace Reference

Functions

std::string make (const std::string &host, const std::string &type)

Function Documentation

◆ make()

std::string BlockPage::make ( const std::string & host,
const std::string & type )
inline

Definition at line 61 of file block_page.hpp.

61 {
62
63 const std::string logo_uri = load_logo_base64();
64 const std::string logo_html = logo_uri.empty()
65 ? R"(<span style="font-size:28px;line-height:40px;">&#x1F6E1;</span>)"
66 : R"(<img src=")" + logo_uri + R"(" alt="BastionGuard" width="36" height="36" style="border-radius:6px;">)";
67
68 const std::string js_type = (type == "bank") ? "bank" : "payment";
69
70 std::string body = R"(<!DOCTYPE html>
71<html lang="en" dir="ltr">
72<head>
73<meta charset="UTF-8">
74<meta name="viewport" content="width=device-width,initial-scale=1">
75<title>BastionGuard</title>
76<style>
77 *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
78 :root {
79 --sidebar: #3a6ea5;
static std::string load_logo_base64()

References load_logo_base64(), and make().

Referenced by make(), and TlsIntercept::detail::make_tls_response().