New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TransformToExternalPath setting #1728

Merged
merged 15 commits into from Nov 12, 2018

Conversation

Projects
None yet
1 participant
@RSuter
Owner

RSuter commented Nov 9, 2018

  • Add TransformToExternalPath setting

Transform the internal route to an external route based on the request headers from nginx:

app.UseSwaggerUi3(config => config.TransformToExternalPath = (internalUiRoute, request) => 
{ 
    // The header X-External-Path is set in the nginx.conf file 
    var externalPath = request.Headers.ContainsKey("X-External-Path") ? request.Headers["X-External-Path"].First() : "";  
    return externalPath + internalUiRoute; 
}); 

Breaking changes:

  • Rename SwaggerRoute/SwaggerUiRoute to DocumentPath/Path

RSuter added some commits Nov 9, 2018

RSuter added some commits Nov 9, 2018

@RSuter RSuter merged commit 088a2b7 into master Nov 12, 2018

1 check passed

continuous-integration/appveyor/branch AppVeyor build succeeded
Details

@RSuter RSuter referenced this pull request Nov 15, 2018

Closed

Epic: NSwag v12 #984

5 of 5 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment