File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ const importedWorkers = {};
2323async function importWorker ( workerName , workerPath ) {
2424 const workerContent = ( await fs . promises . readFile ( workerPath , 'utf8' ) )
2525 . toString ( )
26- . replaceAll ( 'webflow. bitrise.io', webflowDomain )
26+ . replaceAll ( "ORIGIN_HOST = ' bitrise.io'" , `ORIGIN_HOST = ' ${ webflowDomain } '` )
2727 . replaceAll (
2828 `urlObject.hostname = 'web-cdn.bitrise.io';` ,
2929 `urlObject.hostname = '${ hostname } '; urlObject.port = ${ port } ; urlObject.search = 'cdn=1';` , // TODO: make this switchable
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ const fs = require('fs');
22const { JSDOM } = require ( 'jsdom' ) ;
33
44const FETCH_TIMEOUT_MS = 30000 ;
5- const SOURCE_URL = 'https://webflow. bitrise.io/' ;
5+ const SOURCE_URL = 'https://bitrise.io/' ;
66
77// Selectors & patterns — centralised so they're easy to update when Webflow changes.
88const VERSION = 'v2' ;
Original file line number Diff line number Diff line change @@ -18,11 +18,13 @@ async function addCorsHeaders(originalResponse) {
1818 return response ;
1919}
2020
21+ const ORIGIN_HOST = 'bitrise.io' ;
22+
2123addEventListener ( 'fetch' , ( event ) => {
2224 const urlObject = new URL ( event . request . url ) ;
2325 let useCors = true ;
2426
25- urlObject . hostname = 'webflow.bitrise.io' ;
27+ urlObject . hostname = ORIGIN_HOST ;
2628
2729 if ( urlObject . pathname . match ( / ^ \/ c a r e e r s \/ m a p s \/ d a t a \. j s o n $ / ) ) {
2830 urlObject . hostname = 'web-cdn.bitrise.io' ;
Original file line number Diff line number Diff line change 1+ const ORIGIN_HOST = 'bitrise.io' ;
2+
13export default {
24 async fetch ( request ) {
35 const urlObject = new URL ( request . url ) ;
46
57 let useCors = false ;
68 let transformBody = null ;
7- urlObject . hostname = 'webflow.bitrise.io' ;
9+ urlObject . hostname = ORIGIN_HOST ;
810
911 if ( urlObject . pathname . match ( / ^ \/ c h a n g e l o g \/ a p i \/ ( .+ \. j s o n ) $ / ) ) {
1012 urlObject . hostname = 'discuss.bitrise.io' ;
Original file line number Diff line number Diff line change 1+ const ORIGIN_HOST = 'bitrise.io' ;
2+
13export default {
24 async fetch ( request ) {
35 const urlObject = new URL ( request . url ) ;
46 const canonical = new URL ( request . url ) ;
57
6- urlObject . hostname = 'webflow.bitrise.io' ;
8+ urlObject . hostname = ORIGIN_HOST ;
79 canonical . hostname = 'bitrise.io' ;
810
911 if ( urlObject . pathname . match ( / ^ \/ i n t e g r a t i o n s \/ s t e p s \/ .+ / ) ) {
Original file line number Diff line number Diff line change 1+ const ORIGIN_HOST = 'bitrise.io' ;
2+
13export default {
24 async fetch ( request ) {
35 const urlObject = new URL ( request . url ) ;
46
5- urlObject . hostname = 'webflow.bitrise.io' ;
7+ urlObject . hostname = ORIGIN_HOST ;
68
79 const actualPath = 'plans-pricing' ;
810 const variantPath = 'plans-pricing-pro-plan-variant' ;
Original file line number Diff line number Diff line change 1+ const ORIGIN_HOST = 'bitrise.io' ;
2+
13export default {
24 async fetch ( request ) {
35 const urlObject = new URL ( request . url ) ;
46
5- urlObject . hostname = 'webflow.bitrise.io' ;
7+ urlObject . hostname = ORIGIN_HOST ;
68
79 const rssMatch = urlObject . pathname . match ( / ^ \/ s t a c k s \/ ( .* i n d e x \. x m l ) / ) ;
810 if ( rssMatch ) {
You can’t perform that action at this time.
0 commit comments