It works great on my local, just cant get settings...
# support-questions
k
It works great on my local, just cant get settings correct for ec2
r
Hey!
k
Hi !
r
Can you show the CORS error? @karanonymous
k
i tried with with
*
r
So you have set access control allow origin as *
k
its set to
websiteDomain
but it doesnt work so I tried
*
r
Well, you should set it back to websiteDomain
k
i thought so, and did
r
What’s the error that you get when you set it to websiteDomain?
k
page loads but I cant create user or login
and I get these cors errors ofc
r
What’s the url of the page?
k
I am hosting it on ec2
r
I mean what’s the url that’s typed on the browser?
r
Right. So that should be the value of websiteDomain on the backend and frontend
k
yea but when I use that value in api-server.js
r
You need to use https not http
And then it should work
k
oh lord, was it that silly
let me try
r
Cause this url redirects to https on load (as defined by Amazon)
k
let me try real quick
change it both in api-server.js and /App.js right ?
r
Yes
k
still getting this error
r
Hmmmm
k
does that look correct to you.. I have hardcoded the values since its dev version
r
Yea. Seems fine. Are you sure that that’s getting loaded? Instead of the process env var
k
i dont think I have process env var defined
r
Right
Can you open an issue about this on our GitHub? I’ll have a look tomorrow
k
so when I go here now : http://ec2-54-88-43-105.compute-1.amazonaws.com:3000/ it tries to redirect me to https and breaks
r
Apparently the (very popular) lib we use to detect validity of domains thinks that the https version of the above link is not a valid domain
It breaks cause your server is not running?
k
server running now, sorry, check
r
Still not loading anything
Maybe open an issue about this. And we will have a look
Will need to investigate why the lib thinks your domain is not w valid one
k
sounds good. I might use my IP and try again coz it did send a refresh request right as we started chatting. If that doesnt work, ill open an issue
r
Cool.
k
hey it worked when i use my public IP address
but I have to access it thought ip.. which is okay for me
r
Yeaaa. Ideally you should have some domain name and use that. The amazonaws.com domain name is a special domain name that is part of the Mozilla public suffix group. So something is wrong with the full URL that you are using. Will have to check