Comments (6)
You would need to add server.sendHeader("Access-Control-Allow-Origin", "*");
to all handle*
functions in the lib. A pull request to this effect would be welcome.
from configmanager.
You would need to add
server.sendHeader("Access-Control-Allow-Origin", "*");
to allhandle*
functions in the lib. A pull request to this effect would be welcome.
Im willing to do it but it still isn't working. I've added it like this:
And now im getting a different error:
from configmanager.
Chrome does not support CORS on localhost. That is the reason for the other issue.
from configmanager.
Chrome does not support CORS on localhost. That is the reason for the other issue.
Angular app will do the request from localhost though, which is one of the mainly (and good) uses for the library I think. Somehow throught browser is working /scan by removing some tokens my app added in the request:
And im getting the networks json. But it isn't working on the phone indeed.
Also what I still can't make it to work is to POST:
Maybe adding something like send status 200 would work?
Or I think on the POST one maybe this should work: server->sendHeader(F("Access-Control-Allow-Methods"),
F("PUT,POST,GET,OPTIONS")); but it isn't working either so I think the sendHeader isn't working
from configmanager.
The issue is that your server is on localhost, and chrome has blocked CORS on localhost: https://stackoverflow.com/questions/10883211/why-does-my-http-localhost-cors-origin-not-work
from configmanager.
The issue is that your server is on localhost, and chrome has blocked CORS on localhost: https://stackoverflow.com/questions/10883211/why-does-my-http-localhost-cors-origin-not-work
I've fixed it to work on the localhost browser too, Ill do a pull request later
from configmanager.
Related Issues (20)
- Unable to save WiFi settings to EEPROM [esp32] HOT 3
- Saving char arrays in EEPROM HOT 2
- Delay restarting device to allow web server response
- ConfigManager::begin() changes value of int in struct HOT 22
- Metadata adding config values HOT 2
- reading and writing from struct config data HOT 2
- Compiler warning HOT 1
- How can I make it to auto reconnect? HOT 4
- not possible to save the value 0 via settings.html
- Issue using LittleFS HOT 1
- Compiling / version issue with ArduinoJson HOT 3
- settings endpoint will only return last saved value HOT 5
- image file (.jpg/.png) cannot be used in index.html HOT 3
- v3 tracking issue HOT 11
- Saving config with wrong type wipes EEPROM memory HOT 3
- ESP32 Wifi Sucks .. connects every two tries .. Workaround thoughts HOT 4
- Problems with with variables in the sketch HOT 9
- One little problem with one parameter HOT 5
- Is it possible to send a Webpage from ESP32 ? HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from configmanager.