Skip to content

Commit

Permalink
fix: fix domain to work with https (#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
mhfeizi committed Apr 12, 2023
1 parent 410bfd1 commit 646fb9b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/devtools/client/components/ServerRouteDetails.vue
Expand Up @@ -56,7 +56,12 @@ const routeHeaders = ref<RouteParam[]>([{ key: 'Content-Type', value: 'applicati
const queriesCount = computed(() => routeQueries.value.filter(({ key }) => key).length)
const headersCount = computed(() => routeHeaders.value.filter(({ key }) => key).length)
const domain = computed(() => `http://localhost:${config.value?.devServer.port || 3000}`)
const domain = computed(() => {

Check failure on line 59 in packages/devtools/client/components/ServerRouteDetails.vue

View workflow job for this annotation

GitHub Actions / ci

Trailing spaces not allowed
let url = config.value?.devServer.url || 'http://localhost'
if (url.charAt(url.length - 1) === '/')
url = url.slice(0,-1)

Check failure on line 62 in packages/devtools/client/components/ServerRouteDetails.vue

View workflow job for this annotation

GitHub Actions / ci

A space is required after ','
return `${url}:${config.value?.devServer.port || 3000}`
})
const finalURL = computed(() => {
let query = new URLSearchParams(Object.fromEntries(routeQueries.value.filter(({ key }) => key).map(({ key, value }) => [key, value]))).toString()
if (query)
Expand Down

0 comments on commit 646fb9b

Please sign in to comment.