Files
auth_service/src/security/cors.cpp
T
wt e5abe4bb02
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Make (push) Has been cancelled
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-CMake (push) Has been cancelled
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Meson (push) Has been cancelled
added editorconfig and formated code
2025-02-13 19:35:42 +07:00

11 lines
433 B
C++

#include <security/cors.hpp>
#include <colors.h>
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");
}