Merge pull request #2673 from yueguobin/fix/swagger-ui-cve-2018-25031

fix: use local swagger-ui static files to resolve CVE-2018-25031
This commit is contained in:
Jeremy Grossmann 2026-04-21 00:58:52 +08:00 committed by GitHub
commit 5ee26f5ed7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -6,14 +6,14 @@ See LICENSE file for licensing information.
<!DOCTYPE html>
<html>
<head>
<link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swagger-ui-dist@3.30.0/swagger-ui.css">
<link type="text/css" rel="stylesheet" href="/static/swagger-ui.css">
<link rel="shortcut icon" href="https://fastapi.tiangolo.com/img/favicon.png">
<title>GNS3 controller API - Swagger UI</title>
</head>
<body>
<div id="swagger-ui">
</div>
<script src="https://cdn.jsdelivr.net/npm/swagger-ui-dist@3.30.0/swagger-ui-bundle.js"></script>
<script src="/static/swagger-ui-bundle.js"></script>
<!-- `SwaggerUIBundle` is now available on the page -->
<script>
const ui = SwaggerUIBundle({