added corsheaders
This commit is contained in:
1 parent
4079d3a6fa
commit
ab5389857c
12 files changed
+37
No files matched your search
@@ -7,6 +7,10 @@
|
||||
#include "auth/auth.hpp"
|
||||
#include "users/users.hpp"
|
||||
|
||||
#define CORS_ENABLE
|
||||
|
||||
#include "security/cors.hpp"
|
||||
|
||||
int main() {
|
||||
httplib::Server srv;
|
||||
|
||||
@@ -19,6 +23,8 @@ int main() {
|
||||
srv.Post("/api/access", user_access);
|
||||
srv.Post("/api/users/user/change", change_user);
|
||||
|
||||
srv.Options("/api/token", set_cors_headers);
|
||||
|
||||
srv.set_mount_point("/admin", "../src/web");
|
||||
srv.set_mount_point("/js", "../src/web/js");
|
||||
srv.set_mount_point("/css", "../src/web/css");
|
||||
|
||||
Reference in new issue
Block a user