Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions precise/src/AsyncTrinoClient.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ class TrinoQueryRunner {
state.stats.state = 'CANCELLING'
this.state = state
this.setStatus(state)
const nextUri = state.nextUri.replace('http://localhost:8080', '')
const nextUri = state.nextUri.replace(/^https?:\/\/[^/]+/, '')

// cancel query
fetch(nextUri, {
method: 'DELETE',
Expand Down Expand Up @@ -255,7 +256,7 @@ class TrinoQueryRunner {
async NextPage(previous: any) {
try {
// fix cors for testing
const nextUri = await previous.nextUri.replace('http://localhost:8080', '')
const nextUri = await previous.nextUri.replace(/^https?:\/\/[^/]+/, '')
const response = await fetch(nextUri, {
method: 'GET',
headers: {
Expand Down