swagger-api / swagger-api/swagger-codegen
Mixed content warning / please serve generator.swagger.io via https by default
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
- Go to https://editor.swagger.io/
- Click "generate server" and try to download a server
- Have a look into your browsers console
Suggest a fix/enhancement
Serve generator.swagger.io via https (by default).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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