Skip to content

Commit

Permalink
fix: allow to keep unquoted profile based on query-string
Browse files Browse the repository at this point in the history
(cherry picked from commit 1d7d45b)
  • Loading branch information
Gabriel Garcia committed Feb 1, 2022
1 parent 0220963 commit ff9ce71
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,11 @@ public void OnResultExecuting([NotNull]ResultExecutingContext context)

if (schemaAttribute != null)
{
var keepUnquoted = context.HttpContext.Request.Query.ContainsKey("keep-unquoted-profile");

context.HttpContext.Response.OnStarting((o) =>
{
AddProfileToContentType(context, schemaAttribute);
AddProfileToContentType(context, schemaAttribute, keepUnquoted);
return Task.FromResult(0);
}, null);
}
Expand Down

0 comments on commit ff9ce71

Please sign in to comment.