From 08e0b9338095582a64ab519a4d784b03db7df90b Mon Sep 17 00:00:00 2001 From: Jason Snow Date: Mon, 2 May 2022 14:26:31 -0400 Subject: [PATCH] Fix same origin detection --- src/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index 8a1fc25..457671b 100644 --- a/src/index.js +++ b/src/index.js @@ -72,10 +72,10 @@ export class RockClient { config = config || {} if (_Rock && config.url === undefined) { - this.url = `${window.location.origin}/api` + this.url = window.location.origin this.sameOrigin = true } else { - this.url = config.url || `${window.location.origin}/api` + this.url = config.url || window.location.origin this.username = config.username this.password = config.password this.token = config.token