This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
How I can provide a convenient mechanism for filtering HTTP requests entering my application?
The correct would be filter the requests for each route in page onStart()
function or using routes/middlewares?
I would think that you can use Laravel's middleware functionality to extend the Router. This should be done within your Plugin's register()
method as per the OctoberCMS docs.
Or, in a routes.php
in the plugin's folder according to Services > Router
Last updated
I have a CMS page with url /dashboard
. Only users with certain session key can access this page. If the user is not authenticated, I need to set status to 404 and display CMS /404
page or redirect to CMS page /home
.
You can show me a code example of middleware functionality extending Router to do this?
Last updated
1-3 of 3