Skip to content

Commit

Permalink
vite.config: Update rate limiter/timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
pH-7 committed May 7, 2024
1 parent 6fa3c8f commit 8d5d3cc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ function searchEndpointServerHook<T extends ViteDevServer | PreviewServer>(
server: T,
) {
const rateLimiterOptions = {
points: 4, // allocate points
points: 10, // allocate points
duration: 5, // per second
};
const rateLimiter = new RateLimiterMemory(rateLimiterOptions);
Expand Down Expand Up @@ -240,8 +240,8 @@ async function fetchSearXNG(
language: "auto",
safesearch: "0",
format: "json",
engine: "all", // Exclude the Wikidata engine
timeout: "5000", // Set a timeout of 5 seconds
engine: "all", // All engines
timeout: "10000", // Set a timeout of 10 seconds
}).toString();

const response = await fetch(url);
Expand Down

0 comments on commit 8d5d3cc

Please sign in to comment.