refactor and review
This commit is contained in:
1 parent
721e616207
commit
29df9728e2
16 files changed
+351
-174
No files matched your search
@@ -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");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user