From 2508c7cf38ed412bdffffd74b31d003651571187 Mon Sep 17 00:00:00 2001 From: Terry Truong Date: Fri, 8 Jul 2022 02:16:42 +1000 Subject: Add basic conversion to POST requests 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. --- vite.config.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'vite.config.js') 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'] }, -- cgit v1.2.3