We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f555ea6 commit 000c079Copy full SHA for 000c079
api-routes/src/index.ts
@@ -40,9 +40,10 @@ class RedisRateLimiter {
40
UPSTASH_REDIS_URL: string;
41
UPSTASH_REDIS_TOKEN: string;
42
}>(c);
43
+ const cleanRedisUrl = UPSTASH_REDIS_URL.replace(/^['"]|['"]$/g, '').trim();
44
const redisClient = new Redis({
45
token: UPSTASH_REDIS_TOKEN,
- url: UPSTASH_REDIS_URL
46
+ url: cleanRedisUrl
47
});
48
const ratelimit = new Ratelimit({
49
redis: redisClient,
@@ -63,7 +64,7 @@ app.use(async (c, next) => {
63
64
await next();
65
66
-app.use('/api/*', cors());
67
+app.use(cors());
68
69
// 🌱 GET: "/" - Returns all the SVGs data:
70
app.get('/', async (c) => {
0 commit comments