File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3535 NETLIFY_JWS_SECRET
3636 steps :
3737 - uses : actions/checkout@v6
38- - name : Deploy Cloudflare Worker (${{ matrix.worker }})
38+ - name : (${{ matrix.worker }}) Deploy Cloudflare Worker
3939 uses : cloudflare/wrangler-action@v3
4040 with :
4141 apiToken : ${{ secrets.CF_API_TOKEN }}
Original file line number Diff line number Diff line change @@ -115,6 +115,12 @@ async function handleRequest(req) {
115115 return addSecurity ( req , requestUrl )
116116 }
117117
118+ if ( match = requestUrl . hostname . match ( / ^ c v - ( s t a g i n g | r o l e ) - ( [ ^ . ] + ) \. / ) ) {
119+ const type = ( match [ 1 ] == 'staging' ? 'deploy-preview' : 'role' )
120+ requestUrl . hostname = `${ type } -${ match [ 2 ] } --cmbuckley-cv.netlify.app`
121+ return addSecurity ( req , requestUrl )
122+ }
123+
118124 if ( req . method == 'POST' && requestUrl . hostname == 'cmbuckley.co.uk' ) {
119125 requestUrl . hostname = 'cmbuckley.netlify.app'
120126 return addSecurity ( req , requestUrl )
@@ -126,7 +132,7 @@ async function handleRequest(req) {
126132 return Response . redirect ( dest , 302 )
127133 }
128134
129- if ( requestUrl . hostname . match ( / s c r i p t s \ .c m b u c k l e y \ .c o \ .u k $ / ) ) {
135+ if ( requestUrl . hostname . endsWith ( ' scripts.cmbuckley.co.uk' ) ) {
130136 return await fetch ( req )
131137 }
132138
You can’t perform that action at this time.
0 commit comments