refactor and review

This commit is contained in:
wt committed 2024-06-05 22:46:05 +07:00
1 parent 721e616207
commit 29df9728e2
16 files changed
+351 -174

No files matched your search

+1 -2
View File
@@ -1,10 +1,9 @@
#include "cors.hpp"
#include "../colors.h"
void set_cors_headers(const httplib::Request& request, httplib::Response& response) {
void set_cors_headers(const httplib::Request &request, httplib::Response &response) {
std::cout << GREEN << request.path << " " << std::endl;
response.set_header("Access-Control-Allow-Origin", "*");
response.set_header("Access-Control-Allow-Methods", "GET,POST,OPTIONS");
response.set_header("Access-Control-Allow-Headers", "Authorization,X-Custom,Content-Type");
}