esp_http_server and vue-router interaction

vivask
Posts: 1
Joined: Tue Aug 30, 2022 4:21 am

esp_http_server and vue-router interaction

Postby vivask » Tue Aug 30, 2022 5:24 am

There is a problem of interaction between esp_http_server and vue-router.
You can see this issue in the restful server example (https://github.com/espressif/esp-idf/tr ... ful_server).
Only the '/' request is handled correctly, which redirects to an existing index.html file.
Direct requests from the browser through other paths, such as '/chart' and '/light', are not processed correctly and result in errors opening non-existent files.
Obviously, requests from the browser directly to http://foo/chart are not handled correctly and are not passed to vue-router.
The error also occurs when executing the js code this.$router.go('/chart').
When testing the same vue code with node.js locally, no error is observed.
The test was carried out using:
- esp-idf v.4.4.2
- vue v2

Who is online

Users browsing this forum: No registered users and 60 guests