47b89b32ef
Change-Id: I1b6dcd2ec1fbef6556d70b8af3ccfd5d6a95c59a Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
27 lines
852 B
C++
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: */
|