aboutsummaryrefslogtreecommitdiff
path: root/vite.config.js
diff options
context:
space:
mode:
authorTerry Truong <terry06890@gmail.com>2022-07-08 02:16:42 +1000
committerTerry Truong <terry06890@gmail.com>2022-07-08 02:23:23 +1000
commit2508c7cf38ed412bdffffd74b31d003651571187 (patch)
treeab27930fc6fc9542710e1391332c3e1c2d6d7737 /vite.config.js
parentef4a9b9223d6019f0b782eb2f944f3cfe2b6ed41 (diff)
Add basic conversion to POST requeststest-post-reqs
Using fetch() sent a CORS preflight request, which python's basic server couldn't understand. Using fetch()'s 'no-cors' option seems to just fail. Ended up using Vite's proxy functionality again. CGI script also got unexpected empty command line argument.
Diffstat (limited to 'vite.config.js')
-rw-r--r--vite.config.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/vite.config.js b/vite.config.js
index f1e7552..ebcdcd3 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -5,6 +5,9 @@ export default defineConfig({
base: '/',
plugins: [vue()],
server: {
+ proxy: {
+ '/cgi-bin/data.py': 'http://localhost:8000'
+ },
watch: {
ignored: ['**/backend', '**/public']
},