libreoffice-online/wsd/ProxyRequestHandler.hpp
Michael Meeks 47b89b32ef spdx: improve machine and human readability of headers.
Change-Id: I1b6dcd2ec1fbef6556d70b8af3ccfd5d6a95c59a
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2023-10-31 10:33:07 +00:00

27 lines
852 B
C++

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
/*
* Copyright the Collabora Online contributors.
*
* SPDX-License-Identifier: MPL-2.0
*/
#pragma once
#include <string>
#include "Socket.hpp"
class ProxyRequestHandler
{
public:
static void handleRequest(const std::string& relPath,
const std::shared_ptr<StreamSocket>& socket,
const std::string& serverUri);
static std::string getProxyRatingServer() { return ProxyRatingServer; }
private:
static std::chrono::system_clock::time_point MaxAge;
static constexpr auto ProxyRatingServer = "https://rating.collaboraonline.com";
static std::unordered_map<std::string, std::shared_ptr<http::Response>> CacheFileHash;
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */