Improved Documentation Search (#61)

* chore: (Improve documentation search for V3)

* fix: checks for mispelled words

* fix: mispelled words

* fix spaces and syntax

* Update multi-database-tenancy.blade.md

Co-authored-by: Samuel Stancl <samuel.stancl@gmail.com>
This commit is contained in:
Adebayo Ilerioluwa 2020-07-21 19:18:29 +01:00 committed by GitHub
parent 0549607899
commit a4645b3abd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
42 changed files with 158 additions and 158 deletions

View file

@ -4,7 +4,7 @@ extends: _layouts.documentation
section: content
---
# Session scoping
# Session scoping {#session-scoping}
Session scoping is one thing that you might have to deal with yourself.
@ -12,15 +12,15 @@ The issue occurs when you're using multiple tenant domains and databases. Users
Here's how you can prevent this.
## Storing sessions in the database
## Storing sessions in the database {#storing-sessions-in-the-database}
Since the databases are automatically separated, simply using the database as the session driver will make this problem disappear altogether.
## Storing sessions in Redis
## Storing sessions in Redis {storing-sessions-in-redis}
This is the same solution as using the DB session driver. If you use the [`RedisTenancyBootstrapper`]({{ $page->link('tenancy-bootstrappers') }}), your Redis databases will be automatically separated for your tenants, and as such, any sessions stored in those Redis databases will be scoped correctly.
## Using a middleware to prevent session forgery
## Using a middleware to prevent session forgery {#using-a-middleware-to-prevent-session-forgery}
Alternatively, you may use the `Stancl\Tenancy\Middleware\ScopeSessions` middleware on your tenant routes to make sure that any attempts to manipulate the session will result in a 403 unauthorized response.