Commit 0e11c2d
Use branded <dn>/… links for bid + affiliate on tenant pages (#16)
Inside a masked parked-domain iframe, the bid link was a relative /?bid=<dn>, so
it navigated the iframe to moshcoding.com/?bid=<dn> — which refuses to be framed
(no ?dn → CSP frame-ancestors blocks it): 'moshcoding.com refused to connect'.
And the affiliate share link exposed moshcoding.com/?dn=<dn>&ref=<code>.
Both now use the branded domain URL:
- Bid link → https://<dn>/?bid=<dn> with target=_top (breaks out of the iframe
to the branded domain instead of loading moshcoding.com in-frame)
- Affiliate share link → https://<dn>/?ref=<code>
- middleware also auto-allows the ?bid=<domain> as a frame-ancestor (like ?dn),
so a forwarded bid page renders in-frame
Note: the domain's forwarding must pass query params through (Porkbun masked
forwarding with path/query, or param forwarding) for ?ref/?bid to reach the app;
safeDomain already handles the appended-query case.
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent c7c4c58 commit 0e11c2d
3 files changed
Lines changed: 13 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
| 117 | + | |
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
| |||
0 commit comments