Hi Rich,
Thanks for the extra details. We could definitely use better error handling (and we’re working on that, I promise). It does indeed sound like a CORS issue, but let’s verify that’s the issue first. Can you open your browser’s web console, switch to the network tab, and then execute the call? Following what you see there, we can (hopefully) proceed. From: "Morrisey, Richard" <[email protected]> Date: Wednesday, 18 January 2017 at 12:53 To: Ron Ratovsky <[email protected]>, "[email protected]" <[email protected]> Cc: "Morgan, Hunter" <[email protected]> Subject: Re: cors/authentication headers Ron, I originally had this issue. I installed swagger-editor 20.10.4 on osx 10.11.6 (my laptop), from github using the online documentation. I have a request that requires basic authentication. My security section looks like: securityDefinitions: userSecurity: type: basic description: HTTP Basic Authentication. Works over `HTTP` and `HTTPS` My path looks like: /v2/data/clusters: get: security: - userSecurity: [] description: | Returns a list of provisioned clusters responses: 200: description: Cluster JSON I enter my credentials in the rendered control panel and get a green checkmark. I click ‘Try this Operation’ on the indicated path, then ‘send request’. Then I see ‘ERROR Server not found or an error occurred’. (‘or an error occurred’ seems to wipe out the specificity of ‘Server not found’). I’m pretty sure the server is being resolved in an earlier path/request that does not need basic auth, there is no problem getting to the server. However, I do note that there is no ‘Authorization:’ header in the request for this path even though I am specifying security. We also have a warning about CORS. This may be a red-herring. Thanks for any help. Rich From: Ron Ratovsky <[email protected]> Date: Wednesday, January 18, 2017 at 3:05 PM To: "[email protected]" <[email protected]> Cc: "Morgan, Hunter" <[email protected]>, "Morrisey, Richard" <[email protected]> Subject: Re: cors/authentication headers Hi Hunter, Replied to you on IRC. It’s unclear what the actual problem is. You’re describing the solution you tried, but not what you experienced and what you’re trying to solve. So, what’s the original issue? From: <[email protected]> on behalf of hunter morgan <[email protected]> Reply-To: "[email protected]" <[email protected]> Date: Wednesday, 18 January 2017 at 9:07 To: Swagger <[email protected]> Cc: "[email protected]" <[email protected]>, "[email protected]" <[email protected]> Subject: cors/authentication headers this copies something from IRC. just want to make sure it didn't get lost. hey a teammate and i were unable yesterday to get a locally running swagger-editor to supply authentication to an api we were trying to test. i tried adding config from http://enable-cors.org/server_nginx.html, specifically the contents of one of the second two if blocks, because nginx complained at the inclusion of ifs. must have something to do with the structure. maybe because it's reverse proxying back to a node restify api? I also tried http://enable-cors.org/server_expressjs.html on the node api, but still no love. the nginx and api are live, in another castle, so i suspect it's cors tripping us up. the import proxy setting, is that just for spec import, not for proxying try it out requests? i tried starting a local cors-it and using that in that config section as well, but it didn't seem to change anything. -- You received this message because you are subscribed to the Google Groups "Swagger" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout. The information contained in this e-mail is confidential and/or proprietary to Capital One and/or its affiliates and may only be used solely in performance of work or services for Capital One. The information transmitted herewith is intended only for use by the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer. -- You received this message because you are subscribed to the Google Groups "Swagger" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
