Skip to content

Commit 0d0319e

Browse files
authored
Remove USE_ORIGIN_PCT (#79)
* Update index.js * Update index.js * Update wrangler.toml
1 parent a66a3fb commit 0d0319e

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

src/index.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* global SENTRY_DSN, SENTRY_RELEASE, SENTRY_ENVIRONMENT, USE_ORIGIN_PCT */
1+
/* global SENTRY_DSN, SENTRY_RELEASE, SENTRY_ENVIRONMENT */
22

33
import { Hono } from 'hono';
44
import { cors } from 'hono/cors';
@@ -72,9 +72,6 @@ errorRoutes(app);
7272

7373
// Let's go!
7474
addEventListener('fetch', event => {
75-
// Allow usage of fallback origin randomly
76-
if (typeof USE_ORIGIN_PCT === 'number' && Math.random() < (USE_ORIGIN_PCT / 100)) return fetch(event.request);
77-
7875
// Pass to hono
7976
event.respondWith(app.handleEvent(event));
8077
});

wrangler.toml

-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ METADATA_BASE = ""
88
SENTRY_DSN = ""
99
SENTRY_RELEASE = ""
1010
SENTRY_ENVIRONMENT = "development"
11-
USE_ORIGIN_PCT = 0
1211

1312
[env.staging]
1413
route = "api.cdnjs.dev/*"
@@ -19,7 +18,6 @@ METADATA_BASE = ""
1918
SENTRY_DSN = "" # Will be injected by build pipeline
2019
SENTRY_RELEASE = "" # Will be injected by build pipeline
2120
SENTRY_ENVIRONMENT = "staging"
22-
USE_ORIGIN_PCT = 0
2321

2422
[env.production]
2523
route = "api.cdnjs.com/*"
@@ -30,4 +28,3 @@ METADATA_BASE = ""
3028
SENTRY_DSN = "" # Will be injected by build pipeline
3129
SENTRY_RELEASE = "" # Will be injected by build pipeline
3230
SENTRY_ENVIRONMENT = "production"
33-
USE_ORIGIN_PCT = 0

0 commit comments

Comments
 (0)