Skip to content

Commit 80508e1

Browse files
committed
Access-Control-Allow-Origin header for GET /control-vectors
1 parent 7b9e872 commit 80508e1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

examples/server/server.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3184,6 +3184,7 @@ int main(int argc, char ** argv) {
31843184
};
31853185

31863186
const auto handle_get_control_vectors = [&ctx_server](const httplib::Request & req, httplib::Response & res) {
3187+
res.set_header("Access-Control-Allow-Origin", req.get_header_value("Origin"));
31873188
json vectors = json::array();
31883189

31893190
for (const auto & vec : ctx_server.params.control_vectors) {

0 commit comments

Comments
 (0)