mirror of
https://github.com/Lissy93/awesome-privacy.git
synced 2026-03-11 08:55:33 +00:00
Fix CORS, allow for client-side and cross-origin GET requests
This commit is contained in:
parent
0720acdb7b
commit
8f01c4f60b
1 changed files with 4 additions and 0 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import { Hono } from 'hono';
|
||||
import { cors } from 'hono/cors';
|
||||
import Fuse from 'fuse.js';
|
||||
|
||||
import {
|
||||
|
|
@ -14,6 +15,9 @@ import index from '../public/index.html'
|
|||
/* Create new Hono app */
|
||||
const app = new Hono({ strict: false });
|
||||
|
||||
/* Enable CORS for all routes */
|
||||
app.use('*', cors());
|
||||
|
||||
/* Serve the index page (which contains the Swagger Docs) */
|
||||
app.get("/", async (ctx) => {
|
||||
if (index) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue