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

Add info to docs on how middlewareConfig Map is consumed #2263

Open
wants to merge 1 commit into
base: release
Choose a base branch
from

Conversation

Martinsos
Copy link
Member

@Martinsos Martinsos commented Sep 2, 2024

TODO: I quickly made a PR with chnage for release branch, for versioned docs, but we should make it instead do a change on the latest version of the docs, on the main.

Comment on lines +135 to +137
You are able to manipulate the `middlewareConfig` `Map` here as much as you want: delete entries, add entries, ... . Or construct a completely new Map. But keep in mind that you could easily mess up how the Wasp app works, as some of the middleware is expected and required. Check above for more info on each preset middleware.

Middleware from the `middlewareConfig` `Map` will be applied in the order of `Map` entries iteration, which is the order of entry insertion.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
You are able to manipulate the `middlewareConfig` `Map` here as much as you want: delete entries, add entries, ... . Or construct a completely new Map. But keep in mind that you could easily mess up how the Wasp app works, as some of the middleware is expected and required. Check above for more info on each preset middleware.
Middleware from the `middlewareConfig` `Map` will be applied in the order of `Map` entries iteration, which is the order of entry insertion.
You can change the `middlewareConfig` object here as much as you want: delete entries, add entries or update entries. You can construct a completely new `middlewareConfig` object if you need to. Keep in mind that you could mess up how the Wasp app works, as some of the middleware is expected and required. Check above for more info on each default middleware.
Middleware from the `middlewareConfig` object will be applied in the order of `Map` entries iteration, which is the order of entry insertion.

I wanted to simplify the language a bit, take it or leave it :)

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