kevinsimard/laravel-cookieless-session

Laravel中间件,用于启动无cookie会话

v1.2.4 2016-09-22 13:26 UTC

This package is not auto-updated.

Last update: 2024-09-14 17:48:11 UTC


README

您只需在请求的"头部"中添加以下键 X-Session-Token 以加载会话。

安装

替换 app/Http/Kernel.php 中的原始开始会话中间件。

<?php namespace App\Http;

use Illuminate\Foundation\Http;

class Kernel extends Http\Kernel
{
    /**
     * @var array
     */
    protected $middleware = [
        //"Illuminate\Session\Middleware\StartSession",
        "Kevinsimard\CookielessSession\Middleware\StartSession",
        ...
    ];
...

替换 config/app.php 中的原始会话服务提供者。

"providers" => [
    ...
    //"Illuminate\Session\SessionServiceProvider",
    "Kevinsimard\CookielessSession\Providers\SessionServiceProvider",
    ...
],

代码结构

├── src
│   └── Kevinsimard
│       └── CookielessSession
│           ├── Middleware
│           │   └── StartSession.php
│           └── Providers
│               └── SessionServiceProvider.php
├── .editorconfig
├── .gitattributes
├── .gitignore
├── LICENSE.md
├── README.md
└── composer.json

许可证

此软件包是开源软件,根据MIT许可证授权。