small explanations in the example on using CORS middleware in Crow v1.0

This commit is contained in:
witcherofthorns 2024-02-18 00:09:35 +03:00 committed by gittiver
parent df756fed45
commit 3f632dd71b
1 changed files with 8 additions and 0 deletions

View File

@ -1,6 +1,14 @@
#include "crow.h"
#include "crow/middlewares/cors.h"
// Warning!
// If you want to use CORS with OPTIONS cache on browser requests,
// be sure to specify each headers you use, please do not use "*"
// else otherwise the browser will ignore you
// Example:
// .headers("Origin", "Content-Type", "Accept", *Your-Headers*)
// .max_age(5);
int main()
{
// Enable CORS