-
Notifications
You must be signed in to change notification settings - Fork 7.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(webserver): Middleware with default middleware for cors, authc, curl-like logging #10186
base: release/v3.1.x
Are you sure you want to change the base?
Conversation
👋 Hello mathieucarbou, we appreciate your contribution to this project! Click to see more instructions ...
Review and merge process you can expect ...
|
0bc70ee
to
cf292b5
Compare
Test Results 62 files 62 suites 16m 34s ⏱️ For more details on these failures, see this check. Results for commit 6b1e5d0. ♻️ This comment has been updated with latest results. |
Memory usage test (comparing PR against master branch)The table below shows the summary of memory usage change (decrease - increase) in bytes and percentage for each target.
Click to expand the detailed deltas report [usage change in BYTES]
|
@mathieucarbou Do you see the possibility to make this enhancement optional? |
I saw that and I was surprised by it... I don't feel to have written 2k of code... |
bc2dc4b
to
6607a91
Compare
Adding a ref to: #10221 (comment) |
31899b0
to
9617be6
Compare
@safocl : I would be glad to revisit this PR but only if there is a real motivation coming from the Espressif team to merge it. Otherwise I won't spend my time updating a PR for nothing. I have already implemented middleware support in the fork of https://github.com/mathieucarbou/ESPAsyncWebServer we maintain (https://github.com/mathieucarbou/ESPAsyncWebServer) and also in v2 branch of PsychicHttp (https://github.com/hoeken/PsychicHttp) which is the future version, with a lot of supported middlewares for CORS, Authc, authz, curl like logging, etc. |
There is interest. we are trying to finish up some big tasks and have a good look at this PR |
521bbaa
to
93c630f
Compare
@safocl : thank your for your review @me-no-dev : thank you for your confirmation I have reworked the PR to clean it - as it was it was more a PoC waiting for some interest. So I correctly did it and cleaned up the things saw by @safocl and much more. I saw several things that I really don't like in WebServer:
|
7f62ca4
to
cf0f79a
Compare
f8d4eea
to
4668e78
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Tested and it works as expected. Just a couple nitpicks.
@lucasssvaz : thanks! I will update the PR soon. |
09ddacb
to
09a9d09
Compare
@mathieucarbou Also, as there are some changes to the WebServer. Maybe it would be better to target branch |
Yes that would be better. What do you think about the 3 bullet points above ? Could I also switch to std::list ? |
09a9d09
to
b3d624e
Compare
I think it should be fine now that we are targeting v3.1.x as long as the flash usage increase is not very significant. There are too many changes from IDF recently that increased flash usage a lot and we are trying to optimize things for space. What do you think @me-no-dev ? |
…curl-like logging
b3d624e
to
6b1e5d0
Compare
This PR improves WebServer with the following additions:
As discussed in #10185, I tested the example thanks to a pio config.
Ideally it would be nice if @me-no-dev and @ayushsharma82 could review this PR, both were involved in these parts.