mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-07 09:51:26 +00:00
rstript service_url (#5997)
This commit is contained in:
@@ -23,6 +23,10 @@ class WebSettingInput extends Component {
|
||||
};
|
||||
}
|
||||
|
||||
UNSAFE_componentWillReceiveProps(nextProps) {
|
||||
this.setState({value: nextProps.value});
|
||||
}
|
||||
|
||||
toggleBtns = () => {
|
||||
this.setState({isBtnsShown: !this.state.isBtnsShown});
|
||||
};
|
||||
|
@@ -1042,7 +1042,7 @@ class SeahubConfigurator(AbstractConfigurator):
|
||||
fp.write('\n')
|
||||
self.write_secret_key(fp)
|
||||
fp.write('\n')
|
||||
fp.write('SERVICE_URL = "http://%s/"' % ccnet_config.ip_or_domain)
|
||||
fp.write('SERVICE_URL = "http://%s"' % ccnet_config.ip_or_domain)
|
||||
fp.write('\n')
|
||||
self.write_database_config(fp)
|
||||
|
||||
|
@@ -543,7 +543,7 @@ if [[ ! -f ${dest_settings_py} ]]; then
|
||||
# -*- coding: utf-8 -*-
|
||||
SECRET_KEY = "$key"
|
||||
|
||||
SERVICE_URL = "http://$ip_or_domain/"
|
||||
SERVICE_URL = "http://$ip_or_domain"
|
||||
|
||||
EOF
|
||||
fi
|
||||
|
@@ -95,6 +95,9 @@ class AdminWebSettings(APIView):
|
||||
error_msg = 'value invalid.'
|
||||
return api_error(status.HTTP_400_BAD_REQUEST, error_msg)
|
||||
|
||||
if key in ('SERVICE_URL', 'FILE_SERVER_ROOT'):
|
||||
value = value.rstrip('/')
|
||||
|
||||
try:
|
||||
setattr(config, key, value)
|
||||
except AttributeError as e:
|
||||
|
Reference in New Issue
Block a user