api-management-developer-portal icon indicating copy to clipboard operation
api-management-developer-portal copied to clipboard

Allow URL routes other than root

Open chenlonghu opened this issue 4 years ago • 9 comments

Every bug report should have precise description and reproduction steps; console traces or source code references are appreciated.

For assistance requests, contact Azure support or submit a post on Stack Overflow. We don't provide support through GitHub Issues. Feature requests can be raised on the Azure Feedback Forum.

Bug description

We've configured the backendUrl for the dev portal, after the deployment of the static website in storage account, we've noticed that the home url couldn't load the css files, and it's being constantly redirected to the base url of the portal instead of the backendUrl that we configured.

Reproduction steps

  1. Go to 'https://{{ baseUrl }}/portal-apim'
  2. Open browser console
  3. See error "404 Resource Not Found" https://{{ baseUrl }}/styles/theme.css

Expected behavior

The beautiful portal site should be loaded with all wwwroot assets.

Is your portal managed or self-hosted?

Self-hosted

Release tag or commit SHA (if using self-hosted version)

[e.g., release tag 2.8.0]

image

chenlonghu avatar May 07 '21 17:05 chenlonghu

@chenlonghu, thank you for opening this issue. We will triage it within the next few business days.

ghost avatar May 07 '21 17:05 ghost

Hi @chenlonghu, as I understand, the {{baseUrl}} here is not just hostname, it's more like https://contoso.com/some-folder? If yes, this is typical browser behavior.

I've seen this issue a few times before, so I'll be adding baseUrl setting at some point. Meanwhile, I guess you can try to play with <base> tag or just include some string-replace into your pipelines.

azaslonov avatar May 12 '21 21:05 azaslonov

@chenlonghu, as a workaround, you can also use a subdomain with the root path.

mikebudzynski avatar May 13 '21 18:05 mikebudzynski

@chenlonghu, thank you for requesting this feature.

ghost avatar May 13 '21 18:05 ghost

Hello @mikebudzynski , thanks for your suggestion, unfortunately we cannot use subdomain for the configuration due to SSL certificate purchase policy in the current project. Hello @azaslonov , indeed, we wanted to configure the backendUrl of the APIM dev portal as "https://{{ baseUrl }}/portal-apim", so that we could use the path based rule in the app gateway to navigate to the APIM dev portal without using the subdomain. It would be nice to have this feature in the project so that we could use alternative routes other than the root url.

chenlonghu avatar May 14 '21 13:05 chenlonghu

Hello, Any news about this request ?

cedrox avatar May 31 '21 13:05 cedrox

By adding this issue to the Backlog project, we have prioritized it for development. You can monitor its status in the project's board.

ghost avatar Jun 01 '21 21:06 ghost

@cedrox, we prioritized the issue for development, but we don't have an ETA at this moment.

mikebudzynski avatar Jun 01 '21 21:06 mikebudzynski

Hi @chenlonghu, as I understand, the {{baseUrl}} here is not just hostname, it's more like https://contoso.com/some-folder? If yes, this is typical browser behavior.

I've seen this issue a few times before, so I'll be adding baseUrl setting at some point. Meanwhile, I guess you can try to play with <base> tag or just include some string-replace into your pipelines.

Hi @chenlonghu how to implement the tag approach. I mean how can we add this tag so that after we build, all index files contains this tag in the head tag? Also how can we add more tags if we want in the head tag of the build output static files?

chinmay29hub avatar Nov 21 '23 15:11 chinmay29hub