Page MenuHomeDevCentral

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

Authored by ptdradmin on Tue, Jul 21, 03:38.

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
Build Status
Buildable 6762
Build 7050: 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.