File tree 2 files changed +9
-2
lines changed
readthedocs/core/static-src/core/js/doc-embed 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -62,9 +62,17 @@ function init() {
62
62
get_data [ 'subproject' ] = true ;
63
63
}
64
64
65
+ // Check for new logic around proxying requests.
66
+ // ``proxied_api_host`` won't exist on existing built docs,
67
+ // so default to ``api_host`` in those cases
68
+ var real_api_host = rtd . api_host ;
69
+ if ( "proxied_api_host" in rtd ) {
70
+ real_api_host = rtd . proxied_api_host ;
71
+ }
72
+
65
73
// Get footer HTML from API and inject it into the page.
66
74
$ . ajax ( {
67
- url : rtd . proxied_api_host + "/api/v2/footer_html/" ,
75
+ url : real_api_host + "/api/v2/footer_html/" ,
68
76
crossDomain : true ,
69
77
xhrFields : {
70
78
withCredentials : true ,
Original file line number Diff line number Diff line change @@ -53,7 +53,6 @@ function get() {
53
53
54
54
var defaults = {
55
55
api_host : 'https://readthedocs.org' ,
56
- proxied_api_host : 'https://readthedocs.org' ,
57
56
ad_free : false ,
58
57
} ;
59
58
You can’t perform that action at this time.
0 commit comments