antfu / vitesse

🏕 Opinionated Vite + Vue Starter Template

Home Page:https://vitesse.netlify.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

POST method or any other http method for static pages

u007 opened this issue · comments

commented

Describe the bug/issue

hi,

ive a running website with vitesses. works fine. but when i attempt to post to any of the pages url via curl, it return 403 bad request (empty)

on netlify it return 404.

how do i allow other http method like POST or PUT for my page to work like GET ?
do i need to change something in the route?

We temporarily close this due to the lack of enough information. Please provide a minimal reproduction to reopen the issue. Thanks.

commented

hi,
the starter page itself is the example

@u007 vitesse is not a webserver or an http api, it's just a boilerplate around vite-ssg, which build html files.
There is no reason to do a post on the dev server of vite or the netlify's servers.

look like you need an api ? if it's the case this is out of scope of vitesse or either vue ecosystem

commented

@flapili okay thank you, i did a workaround on server api to redirect to vitesse project

^ if it's not extra big database u can try with data in json file. I'm using vitesse in this way :)

commented

ohh no, i needed to receive post from a postback from payment gateway

ohh no, i needed to receive post from a postback from payment gateway

It's definitively out of scope of frontend, so it's not related to vitesse boilerplate / site-ssg / vite / vue.
You want a backend server with the technology of your choice (express, fastapi, etc ...)