Skip to content

Commit

Permalink
Use the base href for the bake operation instead of using the baseUrl…
Browse files Browse the repository at this point in the history
… to work better with NGNix.
  • Loading branch information
xk00lj committed Oct 21, 2024
1 parent b0e31c4 commit 0afa81e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ export class RecipesComponent implements OnInit {

bakeRecipe(recipeId: string): void {
const instanceId = this.randomId(8)
const baseUrl = window.location.origin;
const baseUrl = (document.querySelector('base') || {}).href;
this.bakeryService.postBake(instanceId, recipeId).subscribe(() => {
window.location.href = `${baseUrl}/instances/${instanceId}`
window.location.href = `${baseUrl}instances/${instanceId}`
});
}

Expand Down

0 comments on commit 0afa81e

Please sign in to comment.