console icon indicating copy to clipboard operation
console copied to clipboard

console loading assets should follow relative url not absolute url

Open hsinhoyeh opened this issue 2 years ago • 0 comments

Hi team,

I am using RELEASE.2022-06-17T02-00-35Z from minio server (which depends on console:@v.0.18.1) upon login via OAuth, I can see some 403 errors from the browser console

Request URL: https://my.domain.com/images/BG_Illustration.svg
Request Method: GET
Status Code: 403 

I think it is relevant to my configuration on setting a subpath (under /console) for the console. so the correct path for retrieving this SVG file should be

https://my.domain.com/console/images/BG_Illustration.svg

The code also reflects this. A relevant path should be used instead of reading from absolute paths.

    oceanBg: {
      backgroundImage: "url(/images/BG_Illustration.svg)",
      backgroundRepeat: "no-repeat",
      backgroundPosition: "bottom left",
      height: "100%",
      width: 324,
    },

I also noted that there are several places having similar issues if you just search for /images/, here are some of them:

link1

"@global": {
--
63 | ".rowLine:hover  .iconFileElm": {
64 | backgroundImage: "url(/images/ob_file_filled.svg)",
65 | },
66 | ".rowLine:hover  .iconFolderElm": {
67 | backgroundImage: "url(/images/ob_folder_filled.svg)",

link2

boxShadow: "0px 3px 5px #00000017",
--
67 | borderRadius: "4px 4px 0px 0px",
68 | fontSize: "14px",
69 | backgroundImage: "url(/images/search-icn.svg)",

link3



"@global": {
--
166 | ".rowLine:hover  .iconFileElm": {
167 | backgroundImage: "url(/images/ob_file_filled.svg)",
168 | },
169 | ".rowLine:hover  .iconFolderElm": {
170 | backgroundImage: "url(/images/ob_folder_filled.svg)",

hsinhoyeh avatar Jul 21 '22 09:07 hsinhoyeh