baseUrl is not always correct? #786

Closed
opened 2025-08-09 17:17:40 +00:00 by fergalmoran · 0 comments
Owner

Originally created by @rosieks on 5/2/2017

In aspnet-prendering package baseUrl of the domain-task package is setup to absolute path of request as I understand this line https://github.com/aspnet/JavaScriptServices/blob/dev/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-prerendering/src/Prerendering.ts#L38

It works fine when I try to reach the following pages:

When I call controller with address api/customers then it's changed to http://localhost:5000/api/customers.

But when I have page with address http://localhost:5000/customer/new then my http call is effectively http://localhost:5000/customer/api/customers which is wrong. I would expect that baseUrl will be set to something like ~/

Is there something what I missing?

*Originally created by @rosieks on 5/2/2017* In `aspnet-prendering` package `baseUrl` of the `domain-task` package is setup to absolute path of request as I understand this line https://github.com/aspnet/JavaScriptServices/blob/dev/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-prerendering/src/Prerendering.ts#L38 It works fine when I try to reach the following pages: * http://localhost:5000/ * http://localhost:5000/customer When I call controller with address `api/customers` then it's changed to http://localhost:5000/api/customers. But when I have page with address http://localhost:5000/customer/new then my http call is effectively http://localhost:5000/customer/api/customers which is wrong. I would expect that baseUrl will be set to something like `~/` Is there something what I missing?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#786
No description provided.