-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…d-auto-redirect-configuration Cookie proxying and auto redirect configuration #128
- Loading branch information
Showing
21 changed files
with
269 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/Ocelot/Configuration/Creator/HttpHandlerOptionsCreator.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using Ocelot.Configuration.File; | ||
|
||
namespace Ocelot.Configuration.Creator | ||
{ | ||
public class HttpHandlerOptionsCreator : IHttpHandlerOptionsCreator | ||
{ | ||
public HttpHandlerOptions Create(FileReRoute fileReRoute) | ||
{ | ||
return new HttpHandlerOptions(fileReRoute.HttpHandlerOptions.AllowAutoRedirect, | ||
fileReRoute.HttpHandlerOptions.UseCookieContainer); | ||
} | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
src/Ocelot/Configuration/Creator/IHttpHandlerOptionsCreator.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using Ocelot.Configuration.File; | ||
|
||
namespace Ocelot.Configuration.Creator | ||
{ | ||
/// <summary> | ||
/// Describes creation of HttpHandlerOptions | ||
/// </summary> | ||
public interface IHttpHandlerOptionsCreator | ||
{ | ||
HttpHandlerOptions Create(FileReRoute fileReRoute); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
namespace Ocelot.Configuration.File | ||
{ | ||
public class FileHttpHandlerOptions | ||
{ | ||
public FileHttpHandlerOptions() | ||
{ | ||
AllowAutoRedirect = true; | ||
UseCookieContainer = true; | ||
} | ||
|
||
public bool AllowAutoRedirect { get; set; } | ||
|
||
public bool UseCookieContainer { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
namespace Ocelot.Configuration | ||
{ | ||
/// <summary> | ||
/// Describes configuration parameters for http handler, | ||
/// that is created to handle a request to service | ||
/// </summary> | ||
public class HttpHandlerOptions | ||
{ | ||
public HttpHandlerOptions(bool allowAutoRedirect, bool useCookieContainer) | ||
{ | ||
AllowAutoRedirect = allowAutoRedirect; | ||
UseCookieContainer = useCookieContainer; | ||
} | ||
|
||
/// <summary> | ||
/// Specify if auto redirect is enabled | ||
/// </summary> | ||
public bool AllowAutoRedirect { get; private set; } | ||
|
||
/// <summary> | ||
/// Specify is handler has to use a cookie container | ||
/// </summary> | ||
public bool UseCookieContainer { get; private set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.