MCPcopy Create free account
hub / github.com/ClassicOldSong/Apollo / getPinPage

Function getPinPage

src/confighttp.cpp:315–328  ·  view source on GitHub ↗

* @brief Get the PIN page. * @param response The HTTP response object. * @param request The HTTP request object. */

Source from the content-addressed store, hash-verified

313 * @param request The HTTP request object.
314 */
315 void getPinPage(resp_https_t response, req_https_t request) {
316 if (!authenticate(response, request, true)) {
317 return;
318 }
319
320 print_req(request);
321
322 std::string content = file_handler::read_file(WEB_DIR "pin.html");
323 SimpleWeb::CaseInsensitiveMultimap headers;
324 headers.emplace("Content-Type", "text/html; charset=utf-8");
325 headers.emplace("X-Frame-Options", "DENY");
326 headers.emplace("Content-Security-Policy", "frame-ancestors 'none';");
327 response->write(content, headers);
328 }
329
330 /**
331 * @brief Get the apps page.

Callers

nothing calls this directly

Calls 4

authenticateFunction · 0.85
read_fileFunction · 0.85
writeMethod · 0.80
print_reqFunction · 0.70

Tested by

no test coverage detected