Skip to content

Commit

Permalink
Fix same origin detection
Browse files Browse the repository at this point in the history
  • Loading branch information
jyksnw committed May 2, 2022
1 parent 37e857b commit 08e0b93
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 08e0b93

Please sign in to comment.