Closed gerisse closed 4 years ago
403 is only ever returned by the server is you try to access it via the wrong hostname/IP address. It appears that you must access it via one of the following:
I ran into this issue as well. If I'm not mistaken, the problem is that the validateHost
function attempts to retrieve the "host" header, when actually the header name is case sensitive and is actually "Host", with a capital "H".
In the MicroWebSrv source, it looks like headers are all normalized: https://github.com/loboris/MicroPython_ESP32_psRAM_LoBo/blob/c9b9dd184e698bd77ff4fa50ad8564e2258fb4e8/MicroPython_BUILD/components/micropython/esp32/modules/microWebSrv.py#L453
Is that not working as it should?
Hmm, you're right, microWebSrv.py in the rest-improvements
fork of MicroPython does indeed lower case its headers:
In retrospect, I think I ran into this issue when I mistakenly attempted to use the official micropython firmware instead of building and running the rest-improvements
version. So, disregard my previous comment.
Thanks.
hi i did in my esp32 heltec : i have the good messages :+1:
but Firefox says : 403 Forbidden Request forbidden -- authorization will not help an idea ? Thanks