swagger-api / swagger-api/swagger-codegen

Mixed content warning / please serve generator.swagger.io via https by default

Open
#7,672 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Description

generator.swagger.io is not served via https by default.
When I try to download a server from editor.swagger.io the download fails and my browser (chrome or firefox) send a warning to the console that the content is mixed, because editor.swagger.io is served via https and generator.swagger.io is not (by default).

That's because the swagger editor uses the following code to download the generated files:

this.downloadFile(res, `${name}-${type}-generated.zip`)

https://github.com/swagger-api/swagger-editor/blob/master/src/standalone/topbar/topbar.jsx#L180

downloadFile = (content, fileName) => {
  return reactFileDownload(content, fileName)
}

https://github.com/swagger-api/swagger-editor/blob/master/src/standalone/topbar/topbar.jsx#L44

Swagger-codegen version

2.4.0

Steps to reproduce
Suggest a fix/enhancement

Serve generator.swagger.io via https (by default).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the referenced src/standalone/topbar/topbar.jsx download flow, then locate the deployment or configuration for generator.swagger.io. The issue is done when generated server downloads from editor.swagger.io use HTTPS by default and no mixed-content warning occurs in Chrome or Firefox.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.