Skip to content

Commit 4e41ca9

Browse files
committed
Add andrewmeier.dev redirect to andymeier.dev and pre-PR checklist
1 parent 9a7a69a commit 4e41ca9

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed

AGENTS.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,12 @@
66
- `./fake.sh Watch`
77
- Preferred flow:
88
- `cd app && ./fake.sh Watch`
9+
10+
## Pre-PR checklist
11+
12+
Before creating a PR, always run:
13+
14+
1. `cd app && ./fake.sh Test` — all tests must pass
15+
2. `cd pulumi && pulumi preview` — must show expected changes with no errors
16+
17+
CI runs `pulumi up` on merge to main, so do **not** run `pulumi up` manually.

pulumi/src/cloudflare/redirect.ts

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,40 @@ import * as cloudflare from '@pulumi/cloudflare'
22
import { provider } from './provider'
33
import * as config from '../config'
44

5+
// andrewmeier.dev -> andymeier.dev
6+
const andrewmeierZone = cloudflare.getZoneOutput({
7+
filter: {
8+
account: {
9+
id: config.cloudflareConfig.accountId
10+
},
11+
name: 'andrewmeier.dev'
12+
}
13+
}, { provider })
14+
15+
new cloudflare.Ruleset(`${config.identifier}-andrewmeier-redirect`, {
16+
zoneId: andrewmeierZone.id,
17+
name: 'Redirect andrewmeier.dev to andymeier.dev',
18+
kind: 'zone',
19+
phase: 'http_request_dynamic_redirect',
20+
rules: [{
21+
ref: 'andrewmeier_to_andymeier',
22+
description: 'Redirect andrewmeier.dev to andymeier.dev preserving path',
23+
enabled: true,
24+
expression: '(http.host eq "andrewmeier.dev")',
25+
action: 'redirect',
26+
actionParameters: {
27+
fromValue: {
28+
statusCode: 301,
29+
preserveQueryString: true,
30+
targetUrl: {
31+
expression: 'concat("https://andymeier.dev", http.request.uri.path)'
32+
}
33+
}
34+
}
35+
}]
36+
}, { provider })
37+
38+
// meiermade.com -> andymeier.dev/services
539
const meiermadeZone = cloudflare.getZoneOutput({
640
filter: {
741
account: {

0 commit comments

Comments
 (0)