Comments (3)
I'm not sure about them having to be static, but this is definitely "by design". The idea of the route filter is to take a look at the incoming request (or the context in the context branch) and make a decision about whether the route is acceptable or not. The canonical example is being able to have a route for mobile devices, and a route for desktop devices. I'm not sure what the use case is for needing to have the module initialised to make that decision?
The fact that the module isn't initialised when the filter is run is the big advantage of the implementation. As has been discussed on the forum before, we don't want to spin up multiple modules to handle a single request, as that's expensive. It's arguably less expensive with the context additions, but it's still expensive.
Can you give some use cases why this doesn't fit the bill? Perhaps take it onto the forum for discussion - changing this is not something that should be done lightly imo.
from nancy.
lucisferre - I, like Grumpy, would love to see some real use cases for this. Could you post a couple? Thanks!
from nancy.
It really isn't as big a deal since the addition of the before/after filtering so I'll just close it. There really are no important use cases for this for me anymore.
from nancy.
Related Issues (20)
- 2.0 documentation?
- How to use RequiresClaims in 2.0? HOT 1
- Operation is not supported on this platform on Framework 4.7.2 HOT 3
- Custom JsonSerializer ignored HOT 1
- Response.AsAttachment issue: cannot get response if set filename to Chinese text HOT 1
- Is the doc outdated or do i miss anything? HOT 2
- NancyFx not working on .Net Core 3 HOT 3
- Can't use JavaScriptPrimitiveConverter for primitive values
- VS 2019 templates? HOT 3
- Request body is always empty in .NET Core 2.2 using TestServer as an host
- Avoid compiling Razor views every time an application starts
- Missing 1.4.5 tag
- Add Readme-Zh-cn.md
- NancyCookie doesn't have support for SameSite changes HOT 3
- Nancy attempt to load assemblies not actually used by the application
- Nancy with SSL HOT 2
- Disposing of a custom Bootstrapper makes NancyHost fail silently
- Target .NET Standard 2.1 HOT 1
- Nancy disposes of specific instance dependencies on it's own
- Nancy is not being maintained. Close the project down and communicate it to the community. HOT 28
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 nancy.