adds header
This commit is contained in:
parent
444f49e85d
commit
86e5544572
@ -1,6 +1,5 @@
|
|||||||
#include <crow.h>
|
#include <crow.h>
|
||||||
#include <crow/app.h>
|
#include <crow/app.h>
|
||||||
#include <fstream>
|
|
||||||
|
|
||||||
#include "isbn-interaction.h"
|
#include "isbn-interaction.h"
|
||||||
|
|
||||||
@ -24,6 +23,8 @@ int main()
|
|||||||
CROW_ROUTE(app, "/add/<string>")
|
CROW_ROUTE(app, "/add/<string>")
|
||||||
([](std::string isbn)
|
([](std::string isbn)
|
||||||
{
|
{
|
||||||
|
crow::response response(add_new_book(isbn));
|
||||||
|
response.add_header("Access-Control-Allow-Origin", "*");
|
||||||
return crow::response(add_new_book(isbn));
|
return crow::response(add_new_book(isbn));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user