]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
:arrow_up: Update JS CDN to cdn.jsdelivr.net
authorSebastián Ramírez <tiangolo@gmail.com>
Mon, 10 Dec 2018 16:09:08 +0000 (20:09 +0400)
committerSebastián Ramírez <tiangolo@gmail.com>
Mon, 10 Dec 2018 16:09:08 +0000 (20:09 +0400)
as unpkg.com seems to have been down all day

fastapi/openapi/docs.py

index 955a99f00229df48087cce905cce337a5352d00c..7d8fdfc4df544af42ff6ff7bae1f28f99a9d57f1 100644 (file)
@@ -7,7 +7,7 @@ def get_swagger_ui_html(*, openapi_url: str, title: str) -> HTMLResponse:
     <! doctype html>
     <html>
     <head>
-    <link type="text/css" rel="stylesheet" href="//unpkg.com/swagger-ui-dist@3/swagger-ui.css">
+    <link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swagger-ui-dist@3/swagger-ui.css">
     <title>
     """
         + title
@@ -17,7 +17,7 @@ def get_swagger_ui_html(*, openapi_url: str, title: str) -> HTMLResponse:
     <body>
     <div id="swagger-ui">
     </div>
-    <script src="//unpkg.com/swagger-ui-dist@3/swagger-ui-bundle.js"></script>
+    <script src="https://cdn.jsdelivr.net/npm/swagger-ui-dist@3/swagger-ui-bundle.js"></script>
     <!-- `SwaggerUIBundle` is now available on the page -->
     <script>