Skip to content

Commit

Permalink
Fix URL building in UI
Browse files Browse the repository at this point in the history
Broken by #110

Signed-off-by: Andrew Richardson <[email protected]>
  • Loading branch information
awrichar committed Jan 12, 2023
1 parent 6a6f014 commit f167797
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ui/src/components/Buttons/RunButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ export const RunButton: React.FC<Props> = ({ endpoint, payload, disabled }) => {
if (!isBlob) {
reqDetails.headers = { 'Content-Type': 'application/json' };
}
const postUrlPrefix = new URL(
const url = new URL(
`${window.location.protocol}//${window.location.hostname}:${window.location.port}`
);
const url = new URL(`${postUrlPrefix}${postEndpoint}`);
url.pathname = postEndpoint;
const currentNamespace = localStorage.getItem(
SANDBOX_LOCAL_STORAGE_ITEM_NAME
);
Expand Down

0 comments on commit f167797

Please sign in to comment.