Skip to content
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

Middleware support continues... #170

Merged
merged 1 commit into from
Aug 26, 2024
Merged

Conversation

mathieucarbou
Copy link
Collaborator

No description provided.

@mathieucarbou
Copy link
Collaborator Author

mathieucarbou commented Aug 17, 2024

@hoeken : here are some missing fixes. I can run part of the examples now - but didn't have time to finish testing.

Some notes:

  • middleware chain is now lazy and only initialised if used
  • added a managed boolean to know if we have the right to delete a middleware. User can implement its own middleware and add it to many chains, so removing an endpoint should not delete a user middleware.
  • Lot od ESP_LGOD traces added that we will have to comment out later ;-)

There are still room for memory / perf improvement I saw in the codebase overall, which I will do later.

Another thing to do is to port here the 3 middleware from there: https://github.com/espressif/arduino-esp32/pull/10186/files#diff-3cb168cea5ae30c1231e419a9aa971e09641fae64a1b84bd42428242f875a980

  • cors is done
  • authentication: do we miss some auth type compares to Arduino WebServer ?
  • logging: I added a curl-like logging middleware but we miss some features to be on par with my Arduino PR like getting the HTTP version of the request or server, getting the list of request headers, etc. Also, right now it does not log the response headers, this is something to fix (didn't have time to look further)

@mathieucarbou mathieucarbou self-assigned this Aug 21, 2024
@mathieucarbou mathieucarbou changed the title Middleware (support (continues...) Middleware support continues... Aug 21, 2024
@mathieucarbou
Copy link
Collaborator Author

@hoeken : do not forget to merge this PR before adding more stuff in v2... thanks!

@hoeken hoeken merged commit 92ee3e2 into hoeken:v2-dev Aug 26, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants