Skip to content

Commit c7df56e

Browse files
committed
Remove host prefix for cloudflare worker
1 parent f8a38f2 commit c7df56e

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

.github/workflows/worker.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ jobs:
3232
3333
- name: Replace Port in worker.js
3434
run: |
35-
WORKER_NAME=${{ vars.CLOUDFLARE_WORKER_NAME || 'api' }}
3635
TWITTER_PORT=${{ vars.TWITTER_SERVER_HTTP_PORT || '5000' }}
3736
TWITTER_PORT2=${{ vars.TWITTER_SERVER_HTTP_PORT2 || '5001' }}
3837
GANACHE_PORT=${{ vars.GANACHE_HTTP_PORT || '8546' }}

worker/worker.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ async function handleRequest(request) {
99

1010
// Check the request hostname and set the corresponding backend host and port
1111
if (url.hostname === 'api.btiplatform.com') {
12-
url.hostname = 'host.btiplatform.com';
12+
url.hostname = 'btiplatform.com';
1313
url.port = '__TWITTER_SERVER_HTTP_PORT__';
1414
} else if (url.hostname === 'api-dev.btiplatform.com') {
15-
url.hostname = 'host.btiplatform.com';
15+
url.hostname = 'btiplatform.com';
1616
url.port = '__TWITTER_SERVER_HTTP_PORT2__';
1717
} else if (url.hostname === 'ganache.btiplatform.com') {
18-
url.hostname = 'host.btiplatform.com';
18+
url.hostname = 'btiplatform.com';
1919
url.port = '__GANACHE_HTTP_PORT__';
2020
}
2121

0 commit comments

Comments
 (0)