fix: add internal static.ietf.org var for pdfized render (#5765)

This commit is contained in:
Nicolas Giard 2023-06-05 21:18:35 -04:00 committed by GitHub
parent 7d04a71a94
commit cfaf966492
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 1 deletions

View file

@ -57,3 +57,4 @@ SLIDE_STAGING_PATH = 'test/staging/'
DE_GFM_BINARY = '/usr/local/bin/de-gfm'
STATIC_IETF_ORG = "/_static"
STATIC_IETF_ORG_INTERNAL = "http://localhost:80"

View file

@ -627,7 +627,7 @@ class DocumentInfo(models.Model):
stylesheets.append(finders.find("ietf/css/document_html_txt.css"))
else:
text = self.htmlized()
stylesheets.append(f'{settings.STATIC_IETF_ORG}/fonts/noto-sans-mono/import.css')
stylesheets.append(f'{settings.STATIC_IETF_ORG_INTERNAL}/fonts/noto-sans-mono/import.css')
cache = caches["pdfized"]
cache_key = name.split(".")[0]

View file

@ -178,7 +178,10 @@ STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
)
# Client-side static.ietf.org URL
STATIC_IETF_ORG = "https://static.ietf.org"
# Server-side static.ietf.org URL (used in pdfized)
STATIC_IETF_ORG_INTERNAL = STATIC_IETF_ORG
WSGI_APPLICATION = "ietf.wsgi.application"