This repository has been archived by the owner on Jan 24, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
SSL Behind Proxy
Blair Conrad edited this page Nov 24, 2015
·
5 revisions
#SSL Behind Proxy
Sometimes you may be in a position where your Nancy app is behind a proxy eg/nginx which uses SSL. When the proxy routes the request to Nancy the request scheme will be http. To make it match the proxy scheme you can use SSLProxy.RewriteSchemeUsingForwardedHeaders
.
In your Bootstrapper simply call SSLProxy.RewriteSchemeUsingForwardedHeaders(pipelines);
in ApplicationStartup/RequestStartup
and you're good to go.
NOTE Your proxy must pass in either the X-Forwarded-Proto
header or the newer Forwarded
header with the value proto=https
inside it
[<< Part 22. Token](Token Authentication) - Documentation overview
- Introduction
- Exploring the Nancy module
- Routing
- Taking a look at the DynamicDictionary
- Async
- View Engines
- Using Models
- Managing static content
- Authentication
- Lifecycle of a Nancy Application
- Bootstrapper
- Adding a custom FavIcon
- Diagnostics
- Generating a custom error page
- Localization
- SSL Behind Proxy
- Testing your application
- The cryptography helpers
- Validation
- Hosting Nancy with ASP.NET
- Hosting Nancy with WCF
- Hosting Nancy with Azure
- Hosting Nancy with Suave.IO
- Hosting Nancy with OWIN
- Hosting Nancy with Umbraco
- Hosting Nancy with Nginx on Ubuntu
- Hosting Nancy with FastCgi
- Self Hosting Nancy
- Implementing a Host
- Accessing the client certificate when using SSL
- Running Nancy on your Raspberry Pi
- Running Nancy with ASP.NET Core 3.1