Skip to content

Commit

Permalink
Fix saving of web_root. Fixes #7835 (#7841)
Browse files Browse the repository at this point in the history
* Catch indexer specific exceptions in show refresh

* Fix saving of web_root

* Fix test
  • Loading branch information
medariox authored Mar 15, 2020
1 parent 5dba492 commit 66583ba
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions medusa/server/api/v2/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ class ConfigHandler(BaseRequestHandler):
'webInterface.httpsKey': StringField(app, 'HTTPS_KEY'),
'webInterface.handleReverseProxy': BooleanField(app, 'HANDLE_REVERSE_PROXY'),

'webRoot': StringField(app, 'WEB_ROOT'),
'cpuPreset': StringField(app, 'CPU_PRESET'),
'sslVerify': BooleanField(app, 'SSL_VERIFY'),
'sslCaBundle': StringField(app, 'SSL_CA_BUNDLE'),
Expand Down Expand Up @@ -657,6 +658,7 @@ def data_main():
section_data['webInterface']['httpsKey'] = app.HTTPS_KEY
section_data['webInterface']['handleReverseProxy'] = bool(app.HANDLE_REVERSE_PROXY)

section_data['webRoot'] = app.WEB_ROOT
section_data['cpuPreset'] = app.CPU_PRESET
section_data['sslVerify'] = bool(app.SSL_VERIFY)
section_data['sslCaBundle'] = app.SSL_CA_BUNDLE
Expand Down
1 change: 1 addition & 0 deletions tests/apiv2/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ def config_main(monkeypatch, app_config):
section_data['webInterface']['httpsKey'] = app.HTTPS_KEY
section_data['webInterface']['handleReverseProxy'] = bool(app.HANDLE_REVERSE_PROXY)

section_data['webRoot'] = app.WEB_ROOT
section_data['cpuPreset'] = app.CPU_PRESET
section_data['sslVerify'] = bool(app.SSL_VERIFY)
section_data['sslCaBundle'] = app.SSL_CA_BUNDLE
Expand Down
2 changes: 1 addition & 1 deletion themes-default/slim/src/components/config-general.vue
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@
<p>accept the following reverse proxy headers (advanced)...<br>(X-Forwarded-For, X-Forwarded-Host, and X-Forwarded-Proto)</p>
</config-toggle-slider>

<config-textbox v-model="system.webRoot" label="HTTP web root" id="web_root" autocomplete="no">
<config-textbox v-model="config.webRoot" label="HTTP web root" id="web_root" autocomplete="no">
<p>Set a base URL, for use in reverse proxies.</p>
<p>blank = disabled</p>
<p><b>Note:</b> Must restart to have effect. Keep in mind that any previously configured base URLs won't work, after this change.</p>
Expand Down
2 changes: 1 addition & 1 deletion themes/dark/assets/js/medusa-runtime.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion themes/light/assets/js/medusa-runtime.js

Large diffs are not rendered by default.

0 comments on commit 66583ba

Please sign in to comment.