prefixURL not working correctly when used as environmental variable #401
Unanswered
DanielKlys7
asked this question in
Q&A
Replies: 2 comments
-
I think this is a pretty clear sign that the issue is not with Ky. Looks like the environment variable value includes some hidden spaces. Try |
Beta Was this translation helpful? Give feedback.
0 replies
-
Yeah, definitely a problem with the way the env var is being parsed and serialized. Log the env var and check for any unexpected characters: console.log(process.env.REACT_APP_API_URL) Or: console.log(process.env.REACT_APP_API_URL === '<your url here>') |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Working on
localhost:3000
,.env
containsREACT_APP_API_URL=https://www.reddit.com/
Whenever we want to make a request using this client:
it is made to
http://localhost:3000/%E2%80%8Bhttps://www.reddit.com/r/music/new.json 404 (Not Found)
if
prefixUrl
is set to api directly increate
options parameter, everything works fine.Beta Was this translation helpful? Give feedback.
All reactions