Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/assets/css/custom.css2
-rw-r--r--web/assets/js/axios-init.js12
2 files changed, 9 insertions, 5 deletions
diff --git a/web/assets/css/custom.css b/web/assets/css/custom.css
index d13e3159..671ba24f 100644
--- a/web/assets/css/custom.css
+++ b/web/assets/css/custom.css
@@ -1,5 +1,5 @@
#app {
- height: 100%;
+ height: 100vh;
}
.ant-space {
diff --git a/web/assets/js/axios-init.js b/web/assets/js/axios-init.js
index 22d14d76..bd55c3cf 100644
--- a/web/assets/js/axios-init.js
+++ b/web/assets/js/axios-init.js
@@ -3,10 +3,14 @@ axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
axios.interceptors.request.use(
config => {
- config.data = Qs.stringify(config.data, {
- arrayFormat: 'repeat'
- });
+ if (config.data instanceof FormData) {
+ config.headers['Content-Type'] = 'multipart/form-data';
+ } else {
+ config.data = Qs.stringify(config.data, {
+ arrayFormat: 'repeat',
+ });
+ }
return config;
},
error => Promise.reject(error)
-); \ No newline at end of file
+);