From: b1-luettje <53084931+b1-luettje@users.noreply.github.com> Date: Sat, 31 Aug 2019 00:00:55 +0000 (+0200) Subject: :sparkles: Allow disabling Google fonts in ReDoc (#481) X-Git-Tag: 0.37.0~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c90c4fb6c1ed5d8d8f32dd2e31a022a2bb4aca41;p=thirdparty%2Ffastapi%2Ffastapi.git :sparkles: Allow disabling Google fonts in ReDoc (#481) --- diff --git a/fastapi/openapi/docs.py b/fastapi/openapi/docs.py index f6c996b4bf..024ae269fa 100644 --- a/fastapi/openapi/docs.py +++ b/fastapi/openapi/docs.py @@ -56,6 +56,7 @@ def get_redoc_html( title: str, redoc_js_url: str = "https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js", redoc_favicon_url: str = "https://fastapi.tiangolo.com/img/favicon.png", + with_google_fonts: bool = True, ) -> HTMLResponse: html = f""" @@ -65,7 +66,12 @@ def get_redoc_html( + """ + if with_google_fonts: + html += """ + """ + html += f"""