S
Supabase2mo ago
aksh

Supabase Connectivity from the Etisalat & Other networks in the UAE

It would be great if supabase can provide different domain Supabase URL for UAE affected users.Thanks I am in India, but my client is in UAE (users). Tho it's not a problem from subabase side, but if can provide fallback URL that would be great.
89 Replies
rogiigor.
rogiigor.2mo ago
I agree. We need something rather than nothing
inder
inder2mo ago
For the time being you can try setting up a reverse proxy. A prebuilt solution is linked above
rogiigor.
rogiigor.2mo ago
Thank you, I saw that you posted this. I’ve deployed both of my apps through loveable mostly therefore my level of expertise to apply this pre built solution maybe lacking however I’ll give it a try tomorrow.
inder
inder2mo ago
You can choose render to deploy. It has a free tier and takes just a few clicks. And you can always post your queries here.
rogiigor.
rogiigor.2mo ago
Thank you very much. I really appreciate that since my apps are live and currently they’re down… I’ll see if I can deploy it tomorrow and if I get stuck I’ll post here. Cheers
Alaa Alshaikh
Alaa Alshaikh2mo ago
where is the link for reverse proxy?
rogiigor.
rogiigor.2mo ago
Where are you located mate? Are you in the UAE? Maybe we could link up and you could help me sort this out and I pay you for your time?
inder
inder2mo ago
I can guide you. Its easy. 1. Create a fork of the proxy repo on github 2. Sign up/ login on render.com
rogiigor.
rogiigor.2mo ago
Ok I'm here righnt now... Can try.
inder
inder2mo ago
Let me know once you're done with the above steps
rogiigor.
rogiigor.2mo ago
Ok I beleive I've done both, do you want to talk privately, I may want to use your services aport from this anyway?
inder
inder2mo ago
I believe we should chat about it this publicly so that anyone having trouble deploying can follow the steps 3. Click on New button in the top right and select web service
rogiigor.
rogiigor.2mo ago
Not a problem, I'm happy to help the clueless peeps likemyself. Ok done
inder
inder2mo ago
4. Choose git and enter the url of your forked repo
rogiigor.
rogiigor.2mo ago
Which of these options are you referring to when you say choose "git"?
No description
inder
inder2mo ago
You can choose either option now, either connect with github or use public git repo tab and enter the url
rogiigor.
rogiigor.2mo ago
ok I beleive I've done that
inder
inder2mo ago
5. Now you should be at config screen. - Here enter any name you like this will be used in the url render provides. - choose the region which is closest to your supabase instance and your users. For example if your users and instance is closer to UAE then choose singapore. - make sure plan is free - you will see an option to provide environment variables. Inside there for the variable name Enter SUPABASE_URL and the value should be your supabase instance url
inder
inder2mo ago
No description
rogiigor.
rogiigor.2mo ago
Do I need to click on this "proxy-supabase-cloud" to setup. This is waht I see on my screen rn
No description
inder
inder2mo ago
Yes choose the repo
rogiigor.
rogiigor.2mo ago
Ok named it, chose Singapore Regarding the below point; you will see an option to provide environment variables. Inside there for the variable name Enter SUPABASE_URL and the value should be your supabase instance url Where do I get this information from?
inder
inder2mo ago
This supabase instance url will be the url you were making requests to so far. Look in your code. Is your app built with nextjs?
rogiigor.
rogiigor.2mo ago
Ok found it. My app is built with Lovable so I believe that he app is built with react... Does it matter for any settings I may need to change for this web service?
inder
inder2mo ago
No it doesn't matter. I was just going to ask you to search for specific terms in your codebase based on the framework used. Enter this url in the env variables. Refer to the screenshot above.
rogiigor.
rogiigor.2mo ago
if i share my supabase URL here, is that something I shouldn't do? Also I need the proxy to be FAST, I hear others complaining that it's slow on the free plan, should I upgrade the plan? I'll potentially have 100s of people using the app at the same time as of tomorrow...
inder
inder2mo ago
You can share it if you want. Thats totally upto you. Some users don't share as they are using proxies and don't want the users to know their instance url. Choosing the closest region is the first step. But there will always be some latency. After completing the setup you should test the speed
rogiigor.
rogiigor.2mo ago
Choosing the starter or the Standard plan, doesn't do anything to help the latency?
inder
inder2mo ago
It provides more bandwidth and better machine. It will help you handle more requests simultaneously but you should look to upgrade if you start to see some issues.
rogiigor.
rogiigor.2mo ago
Ok and once I click on "Deploy web services" is there any easy on and off swithc so to speak?
inder
inder2mo ago
Yes you can simply suspend it after deployed Have you entered the url in the variables? Share a screenshot just to be sure. You can hide the instance id
rogiigor.
rogiigor.2mo ago
No description
inder
inder2mo ago
No i meant show the url just hide the part showing your instance id. Like i have done in the screenshot above Good to go
rogiigor.
rogiigor.2mo ago
Ok I've deployed...
inder
inder2mo ago
You can delete the screenshot now if you don't want your instance url to be public at this stage.
rogiigor.
rogiigor.2mo ago
Mate, you are a legend... Let's see how we go with this...
inder
inder2mo ago
Wait for the deployment to complete. You should see a url on the top left. xxxxx.onrender.com
rogiigor.
rogiigor.2mo ago
Says live... does that mean were good to go?
No description
inder
inder2mo ago
In the deployment logs, does it show a message success
rogiigor.
rogiigor.2mo ago
In the middle it says "build successful"
inder
inder2mo ago
Yes good to go.
rogiigor.
rogiigor.2mo ago
I'm afraid to test it ha ha
inder
inder2mo ago
Now use the url render provided In your app, where you're calling createClient, pass this url
rogiigor.
rogiigor.2mo ago
This one?
inder
inder2mo ago
Yes, its also available in the top left to easily copy
rogiigor.
rogiigor.2mo ago
So now in my app I have to change the old Supabase URL with this one? correct?
inder
inder2mo ago
Correct
rogiigor.
rogiigor.2mo ago
That Supabase URL is in 4 different places within my code... I assume I need to change it to the new URL in every instance correct? Or ask Lovable to create something where it just always goes through this for the time being? I just want to be able to change it back once this is fixed... If it is ever fixed...
inder
inder2mo ago
Are you using createClient call multiple times in your reactjs app? I believe this is where you should change and other ones must be referencing this constant Line 5: Defined as the SUPABASE_URL constant
rogiigor.
rogiigor.2mo ago
so the client.ts right...?
inder
inder2mo ago
Yes where the constant is being exported. Based on the info AI gave, it must be like this export const SUPABASE_URL="YOUR_URL"
rogiigor.
rogiigor.2mo ago
ok i'll do that now And I have to save the old supabse URL when they fix it hopefully...
inder
inder2mo ago
Once this isp issue is resolved you can always access the supabase dashboard itself to get this url. Infact you can access the supabase dashboard and other services now by changing the DNS settings on your device. The only reason this proxy is setup because you can't expect your users to change their settings to access your app
rogiigor.
rogiigor.2mo ago
ok I'll change it now and let you know if it worked as expected or if i come up with an issue. Let's see Nope, it didn't work... "Load failed"
inder
inder2mo ago
AI mentioned that the url is being used in 4 different places. Make sure the constant was being used in these 4 different places
rogiigor.
rogiigor.2mo ago
ok, trying to do it now... Cheers I believe it worked but somehow my app is broken now... I'm not sure that the edge functions are going via Supabase...
inder
inder2mo ago
Everything else is working? login/signup?
rogiigor.
rogiigor.2mo ago
Just login is working... nothing else which is connected to supabase... Yes it is.
inder
inder2mo ago
Was the constant not being used everywhere?
rogiigor.
rogiigor.2mo ago
Login is working fine. albeit a bit slow
inder
inder2mo ago
There will be some latency. Once the server is warmed up, then you can give it another try. When you say you're not sure about edge functions not going through, do you see some errors?
rogiigor.
rogiigor.2mo ago
No description
inder
inder2mo ago
Can you share the function code?
rogiigor.
rogiigor.2mo ago
What do you mean "function code" code just for this part of the project?
inder
inder2mo ago
Yes where you call this edge function
rogiigor.
rogiigor.2mo ago
I just checked my code, it's being used everywhere... I'll try and streamline all the functions to go via one place.
inder
inder2mo ago
Do you have access to pc right now? Will have to open browser devtools to see if this is a network issue or an issue in code
rogiigor.
rogiigor.2mo ago
I'm on my PC right now... the error is most definitly with my code... My app is using quite a lot of edge functions from supabase...
inder
inder2mo ago
Press CTRL+Shift+i to open browser devtools while you've your app opened and select network tab and choose Fetch/XHR. In the filter box, enter onrender so that only the requests made to this domain are visible
No description
rogiigor.
rogiigor.2mo ago
The funny thing is and this is hard to epxlain, that the app works fine on my home setup but not where the inteded use for the app is. So I'm testing it using my phone becasue for whatever reason, it deosn't work on my phone on the same network at my house. where it's just broken on my netwrok at the place where it needs to work. I'm not sure if that makes sense or not?
inder
inder2mo ago
And on pc the function works?
rogiigor.
rogiigor.2mo ago
On the PC - MAC it works without any need to change the proxies... atm
inder
inder2mo ago
Did you revert back to the old url? If you're still using onrender url in your app, then that means proxy is still being used. On your phone, try in a private window.
rogiigor.
rogiigor.2mo ago
On my phone, the old Supabase URl doesn't work. The new one works to authenticate but not for some of my edge functions as far as I can tell...
inder
inder2mo ago
Tried in a private window? Share your app url
rogiigor.
rogiigor.2mo ago
yes eactly the same errors
inder
inder2mo ago
and also give me credentials of a test account so that I can see if requests are being made to correct url or not
rogiigor.
rogiigor.2mo ago
Could we please move to a private chat. not here...
inder
inder2mo ago
I've sent you a request
rogiigor.
rogiigor.2mo ago
Just an Update to anyone who might have been listening in to this conversation so it can help them solve their Proxy issue with Etisalat and Du. Everything is working perfectly. I had a problem with my code and not with the Proxy setup from the Repo. Thanks @inder and to anyone else who is listening and may need the same step-by-step help and instructions as I did.
usama
usama2mo ago
sigh i finally managed to fix it. using @inder s proxy index.js as a base. i pushed a cloudflare worker and setup dual clients on my front end since my app has both social azure login for internal employees and normal email pass for external users. external users can finally sign in without vpn and internal users cus its azure and i cant push a custom domain yet cus supabase needs to verify domain ownership and its blocked by isp. just told them to use vpn. if anyone needs any advice for a similar situation lemme know
aksh
akshOP2mo ago
Reply from du dm of my message. I also see the ceo of supabase tweeted & dm’ed them.
No description
No description
No description
aksh
akshOP2mo ago
Paul Copplestone - e/postgres (@kiwicopple)
does anyone have a contacts for Etisalat (@eAndUAE) and du (@dutweets)? they are blocking traffic on customers' domains (the domain is already on the public suffix list)
X
inder
inder2mo ago
Thankyou for posting this here
aksh
akshOP2mo ago
Anyone in UAE can confirm?
No description
aksh
akshOP2mo ago
Didn’t solved yet 🥲 just got message from my client. I got one workaround for UAE network block. and its working well. no proxy needed. just change your supabase url from .co to .in
inder
inder2mo ago
I had a chat with supabase support about this and they don't recommend to use supabase.in for the ISP issue. If you're working locally, then update DNS server to 1.1.1.1 and use proxy in production

Did you find this page helpful?