tailwind + ky + backend oauth connection
This commit is contained in:
parent
bb557f1fb7
commit
5cc652b0af
8 changed files with 160 additions and 19 deletions
12
src/routes/api/[path]/index.tsx
Normal file
12
src/routes/api/[path]/index.tsx
Normal file
|
@ -0,0 +1,12 @@
|
|||
import type { RequestHandler } from '@builder.io/qwik-city';
|
||||
import ky from 'ky';
|
||||
|
||||
export const onGet: RequestHandler = async ({ send, pathname, request }) => {
|
||||
const res = await ky.get(`http://localhost:8081${pathname}`, {
|
||||
method: request.method,
|
||||
headers: request.headers,
|
||||
body: request.method === 'GET' ? null : request.body,
|
||||
});
|
||||
|
||||
send(res);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue