Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » Scratchinfo - an epic website
- god286
-
1000+ posts
Scratchinfo - an epic website
I've got a big problem:
I need to fetch to /foo/bar for something.
So when I fetch to /foo/bar
the first / means the directory of the site right?
BUT it says “INVALID_URL”
But I have to fetch
http://localhost:3000/foo/bar
when the website is in production it won't work obviously
Can someone help?
I need to fetch to /foo/bar for something.
So when I fetch to /foo/bar
the first / means the directory of the site right?
BUT it says “INVALID_URL”
But I have to fetch
http://localhost:3000/foo/bar
when the website is in production it won't work obviously
Can someone help?
Last edited by god286 (Nov. 18, 2021 00:15:33)
meowclient
Typescript and ESM support
Kind-of good documentation
Easy to use
meowclient

_ ____ ___ __
__ _ ___ __| |___ \( _ ) / /_
/ _` |/ _ \ / _` | __) / _ \| '_ \
| (_| | (_) | (_| |/ __/ (_) | (_) |
\__, |\___/ \__,_|_____\___/ \___/
|___/
- MagicCrayon9342
-
1000+ posts
Scratchinfo - an epic website
if you remove localhost, you just have :3000/foo/bar
of course thats an invalid URL
localhost is the address
you need it in the URL
of course thats an invalid URL
localhost is the address
you need it in the URL
signature
- god286
-
1000+ posts
Scratchinfo - an epic website
I edited my question with a bit more information. if you remove localhost, you just have :3000/foo/bar
of course thats an invalid URL
localhost is the address
you need it in the URL
Your answer won't help… sorry
Also, ScratchInfo isn't on Localhost when you view it on the web.
Last edited by god286 (Nov. 18, 2021 00:16:57)
meowclient
Typescript and ESM support
Kind-of good documentation
Easy to use
meowclient

_ ____ ___ __
__ _ ___ __| |___ \( _ ) / /_
/ _` |/ _ \ / _` | __) / _ \| '_ \
| (_| | (_) | (_| |/ __/ (_) | (_) |
\__, |\___/ \__,_|_____\___/ \___/
|___/
- MagicCrayon9342
-
1000+ posts
Scratchinfo - an epic website
Localhost is, localhost. It is your ‘Local’ ‘Host’I edited my question with a bit more information. if you remove localhost, you just have :3000/foo/bar
of course thats an invalid URL
localhost is the address
you need it in the URL
Your answer won't help… sorry
Also, ScratchInfo isn't on Localhost when you view it on the web.
Localhost is being served to an IP/Gateway. ScratchInfo has a domain. Also, without a domain. It would be viewable as your Public IP.
ScratchInfo IS on Localhost, port forwarded, and some stuff with the DNS server.
you might already know this idk
Last edited by MagicCrayon9342 (Nov. 18, 2021 00:29:11)
signature
- god286
-
1000+ posts
Scratchinfo - an epic website
In this case I want it so that I dont need to add the localhost:port partLocalhost is, localhost. It is your ‘Local’ ‘Host’I edited my question with a bit more information. if you remove localhost, you just have :3000/foo/bar
of course thats an invalid URL
localhost is the address
you need it in the URL
Your answer won't help… sorry
Also, ScratchInfo isn't on Localhost when you view it on the web.
Localhost is being served to an IP/Gateway. ScratchInfo has a domain. Also, without a domain. It would be viewable as your Public IP.
ScratchInfo IS on Localhost, port forwarded, and some stuff with the DNS server.
im a nerd ik lmao
meowclient
Typescript and ESM support
Kind-of good documentation
Easy to use
meowclient

_ ____ ___ __
__ _ ___ __| |___ \( _ ) / /_
/ _` |/ _ \ / _` | __) / _ \| '_ \
| (_| | (_) | (_| |/ __/ (_) | (_) |
\__, |\___/ \__,_|_____\___/ \___/
|___/
- god286
-
1000+ posts
Scratchinfo - an epic website
I fixed it, but it's a very werid workaround (Rich harris plz fix)
ignore the thing getting angry at the `
yeah its a bad workaround but it works
let protocol = "https://" if (request.host.startsWith("localhost:")) { protocol = "http://" // on localhost dont expect https } const fetchAddress = `${protocol}${request.host}/myThing`
yeah its a bad workaround but it works
Last edited by god286 (Nov. 18, 2021 02:01:09)
meowclient
Typescript and ESM support
Kind-of good documentation
Easy to use
meowclient

_ ____ ___ __
__ _ ___ __| |___ \( _ ) / /_
/ _` |/ _ \ / _` | __) / _ \| '_ \
| (_| | (_) | (_| |/ __/ (_) | (_) |
\__, |\___/ \__,_|_____\___/ \___/
|___/
- god286
-
1000+ posts
Scratchinfo - an epic website
ScratchLight works! But I don't know if it is secure… or if it can be hacked…
meowclient
Typescript and ESM support
Kind-of good documentation
Easy to use
meowclient

_ ____ ___ __
__ _ ___ __| |___ \( _ ) / /_
/ _` |/ _ \ / _` | __) / _ \| '_ \
| (_| | (_) | (_| |/ __/ (_) | (_) |
\__, |\___/ \__,_|_____\___/ \___/
|___/
- MagicCrayon9342
-
1000+ posts
Scratchinfo - an epic website
you don't have too, just use the domain. If you really need to test it without using the domain, you can just have a it open when you open Firefox. or have a bookmark. There is no working around using localhost:port, you can just do localhost if you set the port to a standard HTTPS port.In this case I want it so that I dont need to add the localhost:port partLocalhost is, localhost. It is your ‘Local’ ‘Host’I edited my question with a bit more information. if you remove localhost, you just have :3000/foo/bar
of course thats an invalid URL
localhost is the address
you need it in the URL
Your answer won't help… sorry
Also, ScratchInfo isn't on Localhost when you view it on the web.
Localhost is being served to an IP/Gateway. ScratchInfo has a domain. Also, without a domain. It would be viewable as your Public IP.
ScratchInfo IS on Localhost, port forwarded, and some stuff with the DNS server.
im a nerd ik lmao
signature
- god286
-
1000+ posts
Scratchinfo - an epic website
I already have a solution, but thanks -snip-
you don't have too, just use the domain. If you really need to test it without using the domain, you can just have a it open when you open Firefox. or have a bookmark. There is no working around using localhost:port, you can just do localhost if you set the port to a standard HTTPS port.

meowclient
Typescript and ESM support
Kind-of good documentation
Easy to use
meowclient

_ ____ ___ __
__ _ ___ __| |___ \( _ ) / /_
/ _` |/ _ \ / _` | __) / _ \| '_ \
| (_| | (_) | (_| |/ __/ (_) | (_) |
\__, |\___/ \__,_|_____\___/ \___/
|___/
- MagicCrayon9342
-
1000+ posts
Scratchinfo - an epic website
Also, constantly worrying about something being ‘hacked’ is pretty dumb. Everything has security vulnerabilities, so it's not worth it.I already have a solution, but thanks -snip-
you don't have too, just use the domain. If you really need to test it without using the domain, you can just have a it open when you open Firefox. or have a bookmark. There is no working around using localhost:port, you can just do localhost if you set the port to a standard HTTPS port.
signature
- kccuber
-
1000+ posts
Scratchinfo - an epic website
uhh just a question, but what's scratchlight? ScratchLight works! But I don't know if it is secure… or if it can be hacked…
- god286
-
1000+ posts
Scratchinfo - an epic website
uhh its my auth thing which supports comments and will be enabled soonuhh just a question, but what's scratchlight? ScratchLight works! But I don't know if it is secure… or if it can be hacked…
meowclient
Typescript and ESM support
Kind-of good documentation
Easy to use
meowclient

_ ____ ___ __
__ _ ___ __| |___ \( _ ) / /_
/ _` |/ _ \ / _` | __) / _ \| '_ \
| (_| | (_) | (_| |/ __/ (_) | (_) |
\__, |\___/ \__,_|_____\___/ \___/
|___/
- god286
-
1000+ posts
Scratchinfo - an epic website
Last edited by god286 (Nov. 19, 2021 00:12:14)
meowclient
Typescript and ESM support
Kind-of good documentation
Easy to use
meowclient

_ ____ ___ __
__ _ ___ __| |___ \( _ ) / /_
/ _` |/ _ \ / _` | __) / _ \| '_ \
| (_| | (_) | (_| |/ __/ (_) | (_) |
\__, |\___/ \__,_|_____\___/ \___/
|___/
- JoshAtticus
-
100+ posts
Scratchinfo - an epic website
Remove the " I've got a big problem:http://" part, localhost and http are different protocols
I need to fetch to /foo/bar for something.
So when I fetch to /foo/bar
the first / means the directory of the site right?
BUT it says “INVALID_URL”
But I have to fetch
http://localhost:3000/foo/bar
when the website is in production it won't work obviously
Can someone help?
~~I'm JoshAtticus!~~
I enjoy scratching, playing with tech and online privacy(not google)
This account is in archived state, I don't post projects here, and I might not be very active with comments and forums
I have 2 new accounts: @OSMANiC Team & @OSMANiCBetas

^^Made with Figlet^^




- JoshAtticus
-
100+ posts
Scratchinfo - an epic website
I have a problem w/ the You page, I go to the authenticator and complete it, however scratch info then says Invalid Authentication
~~I'm JoshAtticus!~~
I enjoy scratching, playing with tech and online privacy(not google)
This account is in archived state, I don't post projects here, and I might not be very active with comments and forums
I have 2 new accounts: @OSMANiC Team & @OSMANiCBetas

^^Made with Figlet^^




- god286
-
1000+ posts
Scratchinfo - an epic website
Hmm.. thats weird. can you log network when you go to the you page I have a problem w/ the You page, I go to the authenticator and complete it, however scratch info then says Invalid Authentication
maybe try to go to the Scratchlight login https://scratchinfo-git-scratchlight-webdev03.vercel.app/dashboard
Last edited by god286 (Nov. 18, 2021 06:51:16)
meowclient
Typescript and ESM support
Kind-of good documentation
Easy to use
meowclient

_ ____ ___ __
__ _ ___ __| |___ \( _ ) / /_
/ _` |/ _ \ / _` | __) / _ \| '_ \
| (_| | (_) | (_| |/ __/ (_) | (_) |
\__, |\___/ \__,_|_____\___/ \___/
|___/
- JoshAtticus
-
100+ posts
Scratchinfo - an epic website
YesHmm.. thats weird. can you log network when you go to the you page I have a problem w/ the You page, I go to the authenticator and complete it, however scratch info then says Invalid Authentication
maybe try to go to the Scratchlight login https://scratchinfo-git-scratchlight-webdev03.vercel.app/dashboard
~~I'm JoshAtticus!~~
I enjoy scratching, playing with tech and online privacy(not google)
This account is in archived state, I don't post projects here, and I might not be very active with comments and forums
I have 2 new accounts: @OSMANiC Team & @OSMANiCBetas

^^Made with Figlet^^




- Chiroyce
-
1000+ posts
Scratchinfo - an epic website
If you fetch “/foo/bar” on localhost:3000, it will default to
if you do it on https://example.com, it will default to
http://localhost:3000/foo/bar
https://example.com/foo/bar
Last edited by Chiroyce (Nov. 18, 2021 08:37:27)
April Fools' topics:
— New Buildings in Scratch's headquarters
— Give every Scratcher an M1 MacBook Air
— Scratch should let users edit other Scratchers' projects
— Make a statue for Jeffalo
— Scratch Tech Tips™
— Make a Chiroyce statue emoji
<img src=“x” onerror=“alert('XSS vulnerability discovered')”>
this is a test sentence
- god286
-
1000+ posts
Scratchinfo - an epic website
localhost:3000, it will default toBut that's not the behaviour in SvelteKit endpoints, so I used a workaround If you fetch “/foo/bar” on #286 to fix it.if you do it on https://example.com, it will default tohttp://localhost:3000/foo/barhttps://example.com/foo/bar
Edit: So fitting, that post is number #286 hah
Last edited by god286 (Nov. 18, 2021 08:39:12)
meowclient
Typescript and ESM support
Kind-of good documentation
Easy to use
meowclient

_ ____ ___ __
__ _ ___ __| |___ \( _ ) / /_
/ _` |/ _ \ / _` | __) / _ \| '_ \
| (_| | (_) | (_| |/ __/ (_) | (_) |
\__, |\___/ \__,_|_____\___/ \___/
|___/
- god286
-
1000+ posts
Scratchinfo - an epic website
300th post! WOOHOO
Thanks everyone! It's been fun
Thanks everyone! It's been fun

meowclient
Typescript and ESM support
Kind-of good documentation
Easy to use
meowclient

_ ____ ___ __
__ _ ___ __| |___ \( _ ) / /_
/ _` |/ _ \ / _` | __) / _ \| '_ \
| (_| | (_) | (_| |/ __/ (_) | (_) |
\__, |\___/ \__,_|_____\___/ \___/
|___/