From c8777504fd3911de8b2a1a95c0a62401ae9497d8 Mon Sep 17 00:00:00 2001 From: Rick Wuebker Date: Wed, 30 Sep 2015 11:06:04 -0700 Subject: [PATCH 1/2] Update README.md - improves wording - line 169 changes 'requires' to 'required' BEFORE: The application is located behind a proxy that enables the requires CORS headers. AFTER : The application is located behind a proxy that enables the required CORS headers. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2e56cd60..d38c7448 100644 --- a/README.md +++ b/README.md @@ -166,7 +166,7 @@ You can read about CORS here: http://www.w3.org/TR/cors. There are two cases where no action is needed for CORS support: 1. swagger-ui is hosted on the same server as the application itself (same host *and* port). -2. The application is located behind a proxy that enables the requires CORS headers. This may already be covered within your organization. +2. The application is located behind a proxy that enables the required CORS headers. This may already be covered within your organization. Otherwise, CORS support needs to be enabled for: From d1325fca4e6386b1e5c7a72e02a4f081c69468d0 Mon Sep 17 00:00:00 2001 From: vinay3scale Date: Tue, 6 Oct 2015 02:03:25 +0530 Subject: [PATCH 2/2] send urlencoded body only when in:formData --- dist/swagger-ui.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/swagger-ui.js b/dist/swagger-ui.js index d64e532f..391a1e35 100644 --- a/dist/swagger-ui.js +++ b/dist/swagger-ui.js @@ -4244,7 +4244,7 @@ Operation.prototype.getBody = function (headers, args, opts) { } // handle form params - if (headers['Content-Type'] === 'application/x-www-form-urlencoded') { + if (headers['Content-Type'] === 'application/x-www-form-urlencoded' && param.in === 'formData') { var encoded = ''; for (key in formParams) { @@ -32278,4 +32278,4 @@ SwaggerUi.Views.StatusCodeView = Backbone.View.extend({ } return this; } -});}).call(this); \ No newline at end of file +});}).call(this);