2019-12-03 20:23:33 +01:00
|
|
|
//
|
|
|
|
// Created by loki on 6/3/19.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef SUNSHINE_NVHTTP_H
|
|
|
|
#define SUNSHINE_NVHTTP_H
|
|
|
|
|
|
|
|
#include <functional>
|
|
|
|
#include <string>
|
2021-05-09 18:55:34 +02:00
|
|
|
#include <Simple-Web-Server/server_http.hpp>
|
|
|
|
#include <Simple-Web-Server/server_https.hpp>
|
2020-01-20 00:22:13 +01:00
|
|
|
#include "thread_safe.h"
|
|
|
|
|
2019-12-03 20:23:33 +01:00
|
|
|
#define CA_DIR SUNSHINE_ASSETS_DIR "/demoCA"
|
|
|
|
#define PRIVATE_KEY_FILE CA_DIR "/cakey.pem"
|
|
|
|
#define CERTIFICATE_FILE CA_DIR "/cacert.pem"
|
|
|
|
|
|
|
|
namespace nvhttp {
|
2020-02-10 00:33:12 +01:00
|
|
|
void start(std::shared_ptr<safe::signal_t> shutdown_event);
|
2021-05-09 18:55:34 +02:00
|
|
|
template<class T> void pin(std::shared_ptr<typename SimpleWeb::ServerBase<T>::Response> response, std::shared_ptr<typename SimpleWeb::ServerBase<T>::Request> request);
|
2019-12-03 20:23:33 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif //SUNSHINE_NVHTTP_H
|