]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
✨ Add ReDoc `<noscript>` warning when JS is disabled (#5074)
authorErik Vroon <erik.vroon22@gmail.com>
Fri, 26 Aug 2022 13:56:07 +0000 (06:56 -0700)
committerGitHub <noreply@github.com>
Fri, 26 Aug 2022 13:56:07 +0000 (13:56 +0000)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
fastapi/openapi/docs.py

index b7803b13bde8128dc51073632509adf5a3453009..bf335118fc791c42fc38e6ab2fb81fb4a8a2b580 100644 (file)
@@ -106,6 +106,9 @@ def get_redoc_html(
     </style>
     </head>
     <body>
+    <noscript>
+        ReDoc requires Javascript to function. Please enable it to browse the documentation.
+    </noscript>
     <redoc spec-url="{openapi_url}"></redoc>
     <script src="{redoc_js_url}"> </script>
     </body>