修復转换异常问题

dependabot/npm_and_yarn/fir_admin/eventsource-1.1.1
nineven 3 years ago
parent e2b9b12613
commit f4ca8d48f9
  1. 47
      fir_client/README.md
  2. 6
      fir_ser/common/core/sysconfig.py
  3. 2
      fir_ser/config.py

@ -39,5 +39,48 @@ yarn lint
``` ```
### Customize configuration ## deploy nginx
See [Configuration Reference](https://cli.vuejs.org/config/).
#### short deploy nginx
```shell
location / {
try_files $uri $uri/ /short.html;
}
```
#### index.html
```html
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="refresh" content="3;URL=https://flyapps.cn">
<title>FLY分发平台</title>
<style>
.container {
width: 60%;
margin: 10% auto 0;
background-color: #f0f0f0;
padding: 2% 5%;
border-radius: 10px
}
ul {
padding-left: 20px;
}
ul li {
line-height: 2.3
}
a {
color: #20a53a
}
</style>
</head>
<body>
<div class="container">
<h3>这是分发平台下载默认页,正在跳转 <a href="https://flyapps.cn">首页</a></h3>
</div>
</body>
</html>
```

@ -63,9 +63,9 @@ class ConfigCacheBase(object):
except TemplateSyntaxError as e: except TemplateSyntaxError as e:
res_list = re.findall("Could not parse the remainder: '{{(.*?)}}'", str(e)) res_list = re.findall("Could not parse the remainder: '{{(.*?)}}'", str(e))
for res in res_list: for res in res_list:
r_value = get_render_context(f'{{{{{res}}}}}', context_dict) r_value = self.get_render_value(f'{{{{{res}}}}}')
value = value.replace(f'{{{{{res}}}}}', r_value) value = value.replace(f'{{{{{res}}}}}', f'{r_value}')
value = get_render_context(value, context_dict) value = self.get_render_value(value)
except Exception as e: except Exception as e:
logger.warning(f"db config - render failed {e}") logger.warning(f"db config - render failed {e}")
except Exception as e: except Exception as e:

@ -41,7 +41,7 @@ class BASECONF(object):
GEETEST_KEY = "6f4ab6185c230a4b1f8430f28ebe4804" GEETEST_KEY = "6f4ab6185c230a4b1f8430f28ebe4804"
GEETEST_CYCLE_TIME = 10 GEETEST_CYCLE_TIME = 10
GEETEST_BYPASS_STATUS_KEY = "gt_server_bypass_status" GEETEST_BYPASS_STATUS_KEY = "gt_server_bypass_status"
GEETEST_BYPASS_URL = "http://bypass.geetest.com/v1/bypass_status.php" GEETEST_BYPASS_URL = "https://bypass.geetest.com/v1/bypass_status.php"
# 访问速率限制 # 访问速率限制
DEFAULT_THROTTLE_RATES = { DEFAULT_THROTTLE_RATES = {

Loading…
Cancel
Save