Page MenuHomeDevCentral

Fix missing CSS on /cd/dashboard without trailing slash
Needs ReviewPublic

Authored by ptdradmin on Tue, Jul 21, 03:38.
Tags
None
Referenced Files
F37736621: D4134.diff
Wed, Jul 22, 01:20
F37692645: D4134.id10843.diff
Tue, Jul 21, 21:53
F37678038: D4134.diff
Tue, Jul 21, 20:39
F37635285: D4134.diff
Tue, Jul 21, 16:37
Subscribers
None

Details

Summary

The prefix location /cd/dashboard proxied requests without a trailing
slash directly to Tommy CD, so the browser resolved relative CSS/JS
assets against /cd/ instead of /cd/dashboard/, breaking the styling.

Redirect the exact /cd/dashboard path to /cd/dashboard/ first, same
pattern already used for /cd and /cd/.

Refs T2289

Test Plan

Verified the location block logic mirrors the existing /cd and /cd/
redirect pattern already deployed for this vhost. Manual check on
web-001 recommended once deployed: hit https://infra.nasqueron.org/cd/dashboard
without a trailing slash and confirm CSS loads.

Diff Detail

Repository
rOPS Nasqueron Operations
Lint
Lint Skipped
Unit
No Test Coverage
Branch
main
Build Status
Buildable 6761
Build 7049: arc lint + arc unit

Event Timeline

ptdradmin created this revision.

I see 3 blocks with the same 302 redirect.

Can we try this to replace lines 49 to 60?

location ~ ^/cd(?:/|/dashboard)?$ {
    return 302 https://infra.nasqueron.org/cd/dashboard/;
}

(to test together before merging I guess)

Merge the three exact-match redirect blocks (/cd, /cd/, /cd/dashboard) into a single regex location, as suggested: location ~ ^/cd(?:/|/dashboard)?$ { ... }

Merge the three exact-match redirect blocks (/cd, /cd/, /cd/dashboard) into a single regex location, as suggested.