Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add example on how to use SessionMiddleware #2251

Merged

Conversation

Bernardoow
Copy link
Contributor

Summary

Add example to how to use session middleware. I made this PR because I found the documentation but the path to middleware is not present. So I had to search on code.

Checklist

  • I understand that this PR may be closed in case there was no previous discussion. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.

routes = ...

middleware = [
Middleware(SessionMiddleware, https_only=True)
Copy link
Member

Choose a reason for hiding this comment

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

I think you need the secret_key argument for SessionMiddleware

Copy link
Contributor Author

@Bernardoow Bernardoow Sep 5, 2023

Choose a reason for hiding this comment

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

@aminalaee you're right.

image

I'm going to fix it now.. sorry. !!

@Kludex Kludex changed the title Update documentation to add example how to use session middleware Add example on how to use SessionMiddleware Dec 16, 2023
@Kludex Kludex enabled auto-merge (squash) December 16, 2023 14:24
@Kludex Kludex merged commit 1b766f4 into encode:master Dec 16, 2023
5 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants