Zach Hoeken
Zach Hoeken
Hey all, I'm not really up to date on CORS. Can someone send me a tutorial on how the client/server need to communicate? It seems like you need to check...
version 2 will let you change that at runtime
Umm, I'm not sure what I was writing there, but I looked in the code now and you should just be able to call handler->setAuthentication() again to update those. You'll...
Okay, so I see what you guys mean now about the CORS. I was experimenting with it, and it seems like sometimes the browser will skip the OPTIONS request and...
I just tested this in v2-dev, and you can update the authentication at runtime: ```cpp // how to do basic auth // curl -i --user admin:admin http://psychic.local/auth-basic server.on("/auth-basic", HTTP_GET, [](PsychicRequest*...
I've been thinking about this a bit, and I think we could add an easy temporary fix that wont break anything without going full-on middleware that will require fairly large...
@mathieucarbou @hitecSmartHome okay, i looked into this a bit more. i see a way forward. 1. i added request->addResponseHeader() and request->getResponseHeaders() to the PsychicRequest object. these get copied into whatever...
Here's a simple html page that will trigger CORS with a GET: ```html Fetch Image Example img { max-width: 100%; height: auto; } Image Fetch Example // URL of the...
then in my server setup there is this: ```cpp PsychicStaticFileHandler* handler = server.serveStatic("/", LittleFS, "/www/"); handler->setFilter(PERMISSIVE_CORS); // this will send CORS headers on options requests server.on("*", HTTP_OPTIONS, [](PsychicRequest* request) {...
@mathieucarbou now that i've studied this a bit, i understand it a lot better. i would like to see this added for sure. to do it properly will require some...