Comments (3)
As I suggested in #48 perhaps these Header based conditions could be provided for in a more general ->headers() method. For example:
Slim::get('/foo/bar', function () {
// Render
})
->headers(array(
'User-Agent' => 'Songbird (\d\.\d)[\d\/]*?'
));
from slim.
Having too many routes with slightly different conditions seems like a bad pattern. It would be faster to check conditions inside a single route, if you have more than a couple.
from slim.
Removing this feature from the road map. Decided this is tangential to the framework itself, and can easily be written as a plugin if necessary using an earlier application hook. See https://github.com/codeguy/Slim/issues/closed#issue/75.
from slim.
Related Issues (20)
- `App::VERSION` not updated HOT 1
- ResponseEmitter can break a 206 Response with a pre-seeked stream by asserting empty and rewinding. HOT 1
- Slim 4 - Unable to set Expires headers with Middleware HOT 1
- Slim 5: Ensure that route attributes are always in the Request
- Slim 5: Enable header manipulation in ErrorRenderer/ErrorHandler HOT 6
- Add a section to the routing docs callbacks section mentioning first class callable syntax HOT 15
- middleware precedence is not working HOT 2
- Nginx subdirectory HOT 2
- Bump slim 2 to 3 with BC HOT 2
- Error handling still problematic HOT 5
- withHeader is not working HOT 1
- PHP8 Fibers Discussion HOT 4
- Will Slim 3.x support PHP8.1 or higher? HOT 5
- Routing error with array $args but not everytime HOT 2
- RuntimeException for PSR-17 ResponseFactory implementations HOT 1
- PSR 7 http-message version requirement HOT 4
- HTML Entity Encoding in PlainTextErrorRenderer HOT 2
- Running out of memory by using custom middlewares HOT 4
- Add #[\ReturnTypeWillChange] attribute to Slim\Collection methods (Slim 3) HOT 1
- How to cache internal https requests HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from slim.