Commit 68fa6d1
authored
fix(codespaces): fix reverse proxy warning and enable CSP (#2184)
Jenkins showed "reverse proxy set up is broken" in Codespaces because
codespacesURL.sh only edits the host-side jenkins.yaml, which is never
read at runtime — the baked-in image copy is used instead.
The discovery container (find-name.sh) already modifies
/var/jenkins_home/jenkins.yaml and triggers a JCasc reload, so it is
the right place to also set the correct root URL.
Changes:
- docker-compose.yaml: pass CODESPACE_NAME and
GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN into the discovery container
- find-name.sh: when those vars are present, update
unclassified.location.url to the Codespaces forwarding URL and
suppress the ReverseProxySetupMonitor admin warning
- jenkins.yaml: add security.contentSecurityPolicy with a permissive
but defined policy to clear the CSP administrative monitor warning
Signed-off-by: Bruno Verachten <gounthar@gmail.com>1 parent a9d8286 commit 68fa6d1
3 files changed
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
33 | 36 | | |
34 | 37 | | |
35 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
34 | 43 | | |
35 | 44 | | |
36 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
43 | 52 | | |
44 | 53 | | |
45 | 54 | | |
0 commit comments