File tree 2 files changed +8
-4
lines changed
2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -192,7 +192,10 @@ def resolve(
192
192
# or fallback to settings
193
193
settings .PUBLIC_DOMAIN_USES_HTTPS and
194
194
settings .PUBLIC_DOMAIN and
195
- settings .PUBLIC_DOMAIN in domain ,
195
+ any ([
196
+ settings .PUBLIC_DOMAIN in domain ,
197
+ settings .RTD_EXTERNAL_VERSION_DOMAIN in domain ,
198
+ ]),
196
199
])
197
200
protocol = 'https' if use_https_protocol else 'http'
198
201
Original file line number Diff line number Diff line change @@ -475,18 +475,19 @@ def test_domain_public(self):
475
475
PRODUCTION_DOMAIN = 'readthedocs.org' ,
476
476
PUBLIC_DOMAIN = 'public.readthedocs.org' ,
477
477
RTD_EXTERNAL_VERSION_DOMAIN = 'dev.readthedocs.build' ,
478
+ PUBLIC_DOMAIN_USES_HTTPS = True ,
478
479
USE_SUBDOMAIN = True ,
479
480
)
480
481
def test_domain_external (self ):
481
482
latest = self .pip .versions .first ()
482
483
latest .type = EXTERNAL
483
484
latest .save ()
484
485
url = resolve (project = self .pip )
485
- self .assertEqual (url , 'http ://pip--latest.dev.readthedocs.build/en/latest/' )
486
+ self .assertEqual (url , 'https ://pip--latest.dev.readthedocs.build/en/latest/' )
486
487
url = resolve (project = self .pip , version_slug = latest .slug )
487
- self .assertEqual (url , 'http ://pip--latest.dev.readthedocs.build/en/latest/' )
488
+ self .assertEqual (url , 'https ://pip--latest.dev.readthedocs.build/en/latest/' )
488
489
url = resolve (project = self .pip , version_slug = 'non-external' )
489
- self .assertEqual (url , 'http ://pip.public.readthedocs.org/en/non-external/' )
490
+ self .assertEqual (url , 'https ://pip.public.readthedocs.org/en/non-external/' )
490
491
491
492
492
493
class ResolverTests (ResolverBase ):
You can’t perform that action at this time.
0 commit comments