Commit bb671a7
authored
fix: use location.origin; remove localhost hardcoding (#127)
I was using tanstack devtools on my local machine. During my project,
some of my logic depended on hostname, so I usually develop using custom
domains.
The tools started to break and I investigated and noticed that localhost
was hardcoded.
DevTools hardcoded {scheme}://localhost:{port} for open-in-editor and
related links, which broke in my setup where I routinely develop on
custom domains/non-loopback hosts (and also impacts IPv6).
This PR replaces the hardcoded origin with location.origin so links
respect the actual scheme/host/port in use; it fixed the failures I
observed while keeping localhost behavior intact.
If this direction makes sense, I’m happy to add tests to prevent
regressions.1 parent 4d7425e commit bb671a7
File tree
2 files changed
+3
-14
lines changed- packages
- devtools-vite/src
- devtools/src
2 files changed
+3
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | 47 | | |
49 | 48 | | |
50 | 49 | | |
| |||
71 | 70 | | |
72 | 71 | | |
73 | 72 | | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | 73 | | |
78 | 74 | | |
79 | 75 | | |
| |||
119 | 115 | | |
120 | 116 | | |
121 | 117 | | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | 118 | | |
132 | 119 | | |
133 | 120 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
177 | | - | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
178 | 180 | | |
179 | 181 | | |
180 | 182 | | |
| |||
0 commit comments