Comments (6)
My original plan was to implement this for MVC 6 so it could be used in the development environment where you are most likely using a port number like localhost:5000
to get to your site. Currently I just disable HTTPS in Development. In Staging or Production, the standard RequireHttpsAttribute could be used which does not support port numbers.
I hadn't really planned to implement this for MVC 5 as in your link but it would certainly help. That implementation using X-Forwarded-Proto is certainly interesting and not something I was aware of. I've mostly used Azure. Is this a standard setup in an AWS load balanced environment? I'm trying to get a feel for how often people come across this HTTP header and need to make use of it.
from templates.
@RehanSaeed It's a thing in Nginx which includes AppHarbor and prob Mono deployments depending on the server. The F5 load balancer may also do this as I've seen it before on other on-premises hosting environments where load balancers strip SSL.
from templates.
Most people will be using IIS and will not come across this then. I would not be averse to adding a filter to the Boilerplate NuGet package however so people can use it if they need to.
Quick question, since you are using Nginx with Boilerplate. I would like to add an option in the MVC 6 template for web server, so imagine a check box for IIS and for Nginx. Enabling the IIS check box gives you a pre-configured web.config file. Having no experience with Nginx, what would that check box do?
from templates.
Sorry but I'm not using this framework. I just stumbled upon your todo list somehow and thought I could, share some code that might be useful.
from templates.
Really appreciate it @cottsak. I've updated the TODO list with 'Add an option to choose the web-server you are using IIS, Nginx etc.'.
from templates.
Linking related AppHarbor support item.
from templates.
Related Issues (20)
- Add Security HTTP Headers
- Disabling Docker Leaves Cake File with No Default Task HOT 1
- Improve Docker Image Security
- Investigate New Docker Settings for HTTPS Support
- .NET 7 Improvements
- Unable to access health checks with Orleans template. HOT 3
- Consider using dotnet-releaser HOT 5
- Add Lets Encrypt Feature
- Add Open Telemetry Metrics
- Include `xunit.analyzers` HOT 2
- Donet Cake DockerBuild does not fail the GH action step HOT 3
- Enable reproducible builds HOT 1
- Add Dev Tunnels to launchSettings.json
- .NET 8 Improvements HOT 1
- Two assets found targeting the same path HOT 2
- Reporting a weird error with .NET 7 and changing hostingContext.HostingEnvironment.ApplicationName
- Swagger does not respond with bad request and instead responds with 406
- .editorconfig syntax errors when using EnableGenerateDocumentationFile
- error xUnit1030: Test methods should not call ConfigureAwait(), as it may bypass parallelization limits.
- Microsoft.AspNetCore.ApplicationInsights.HostingStartup is depreciated.
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 templates.