# fluentform/6.2.14/config/middleware.php

Fluent Forms – Customizable Contact Forms, Survey, Quiz, &amp; Conversational Form Builder, version 6.2.14. 38 lines.

- Page: https://pluginprobe.com/plugins/fluentform/6.2.14/code/config/middleware.php
- Raw: https://pluginprobe.com/plugins/fluentform/6.2.14/raw/config/middleware.php
- Modified: 2026-04-01T13:33:54+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/fluentform/6.2.14/code/config/middleware.php#L10-L20`.

```php
<?php

if ( ! defined( 'ABSPATH' ) ) { exit; }

return [
    'global' => [
        'before' => [
            function ($request, $next) {
                return $next($request->forget('query_timestamp'));
            }
        ],
        'after' => [
            function ($response, $next) {
                return $next($response);
            }
        ]
    ],
    'route' => [
        'before' => [
            'auth' => function($request, $next) {
                if (is_user_logged_in()) {
                    return $next($request);
                }
            },
            'can' => function($request, $next, ...$roles) {
                if (array_intersect($roles, ['create', 'update'])) {
                    return $next($request);
                }
            },
        ],
        'after' => [
            'logger' => function($response, $next) {
                return $next($response);
            }
        ],
    ]
];

```
