Skip to content

Commit c8e4643

Browse files
authored
Merge pull request #2339 from codalab/fix_secret_url
Fix secret_url using the wrong domain name
2 parents 578b131 + f45f433 commit c8e4643

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/templates/base.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ <h4 class="ui inverted header">CodaBench</h4>
292292
},
293293
SECRET_KEY_URL: function (pk, secret_key) {
294294
var url = "{% url "competitions:detail" pk=0 %}".replace(0, pk)
295-
return `{{ request.get_host }}${url}?secret_key=${secret_key}`
295+
return `{{ DOMAIN_NAME }}${url}?secret_key=${secret_key}`
296296
},
297297
COMPETITION_GET_ZIP: function (pk) {
298298
let urlBase = "{% url "competition-results" pk=0 %}".replace(0, pk)

src/utils/context_processors.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,6 @@ def common_settings(request):
5555
'ENABLE_SIGN_UP': settings.ENABLE_SIGN_UP,
5656
'ENABLE_SIGN_IN': settings.ENABLE_SIGN_IN,
5757
'VERSION_INFO': version_info,
58-
'HOME_PAGE_COUNTERS_INFO': home_page_counters_info
58+
'HOME_PAGE_COUNTERS_INFO': home_page_counters_info,
59+
'DOMAIN_NAME': settings.DOMAIN_NAME,
5960
}

0 commit comments

Comments
 (0)