dhakkad
dhakkad
CDCloudflare Developers
Created by dhakkad on 1/30/2024 in #general-help
How to open/forward TURN/STUN port using cloudflare tunnel?
Yup, got it, thanks for the help.
8 replies
CDCloudflare Developers
Created by dhakkad on 1/30/2024 in #general-help
How to open/forward TURN/STUN port using cloudflare tunnel?
@Erisa | Support Engineer possible via warp in gateway mode or not?
8 replies
CDCloudflare Developers
Created by dhakkad on 12/5/2023 in #general-help
CORS issue on/in nodejs and react application via cloudflare tunnel
@Cyb3r-Jok3 Just to add here. At first, I thought the issue was with my backend CORS settings/config or my frontend's baseurl but later (as mentioned above as well) and after trying a few different things, when I disabled Cloudflare's access on both the subdomains api.example.com and front.example.com these are working fine. And when cf access was disabled I even tried changing the CORS allowed origin in the backend to front-test.example.com and still sending a request from front.example.com just to mimic a scenario and check whether my CORS settings are correct or not and by logic the backend did not allow requests from front.example.com as it is now only configured to allow the request from front-test.example.com. So, I believe the issue is with how CF access and CORS are not allowing the same thing to be achievable. IDK what I'm missing.
23 replies
CDCloudflare Developers
Created by dhakkad on 12/5/2023 in #general-help
CORS issue on/in nodejs and react application via cloudflare tunnel
Also, I just noticed, I don't think I need to even enable "Access-Control-Allow-Credentials".
23 replies
CDCloudflare Developers
Created by dhakkad on 12/5/2023 in #general-help
CORS issue on/in nodejs and react application via cloudflare tunnel
No description
23 replies
CDCloudflare Developers
Created by dhakkad on 12/5/2023 in #general-help
CORS issue on/in nodejs and react application via cloudflare tunnel
No description
23 replies
CDCloudflare Developers
Created by dhakkad on 12/5/2023 in #general-help
CORS issue on/in nodejs and react application via cloudflare tunnel
No description
23 replies
CDCloudflare Developers
Created by dhakkad on 12/5/2023 in #general-help
CORS issue on/in nodejs and react application via cloudflare tunnel
Before, with the same config as I mentioned above and the one you tested. I enabled the CORS at the application level (on cf's side) and then I specified origin as front.example.com and and just for a hit and trial I also added api.example.com but I never got it working with this as well. But let me try one more time and I'll provide an update.
23 replies
CDCloudflare Developers
Created by dhakkad on 12/5/2023 in #general-help
CORS issue on/in nodejs and react application via cloudflare tunnel
No description
23 replies
CDCloudflare Developers
Created by dhakkad on 12/5/2023 in #general-help
CORS issue on/in nodejs and react application via cloudflare tunnel
Will this work?
version: '3.8'

services:
wordpress-cf-tunnel:
image: cloudflare/cloudflared
restart: unless-stopped
command: tunnel run
environment:
TUNNEL_TOKEN: ${TUNNEL_TOKEN}
logging:
driver: local
options:
max-size: "10m"
max-file: "3"

api:
build:
context: .
dockerfile: dev.Dockerfile
volumes:
- ./backend/api:/usr/src/app
ports:
- "3333:3000"

frontend:
build:
context: ./frontend
dockerfile: dev.Dockerfile
volumes:
- ./frontend:/app
restart: unless-stopped
ports:
- 8080:3000
environment:
- CHOKIDAR_USEPOLLING=true
logging:
driver: local
options:
max-size: "10m"
max-file: "3"
version: '3.8'

services:
wordpress-cf-tunnel:
image: cloudflare/cloudflared
restart: unless-stopped
command: tunnel run
environment:
TUNNEL_TOKEN: ${TUNNEL_TOKEN}
logging:
driver: local
options:
max-size: "10m"
max-file: "3"

api:
build:
context: .
dockerfile: dev.Dockerfile
volumes:
- ./backend/api:/usr/src/app
ports:
- "3333:3000"

frontend:
build:
context: ./frontend
dockerfile: dev.Dockerfile
volumes:
- ./frontend:/app
restart: unless-stopped
ports:
- 8080:3000
environment:
- CHOKIDAR_USEPOLLING=true
logging:
driver: local
options:
max-size: "10m"
max-file: "3"
23 replies
CDCloudflare Developers
Created by dhakkad on 12/5/2023 in #general-help
CORS issue on/in nodejs and react application via cloudflare tunnel
Great, thank you 🙏
23 replies
CDCloudflare Developers
Created by dhakkad on 12/5/2023 in #general-help
CORS issue on/in nodejs and react application via cloudflare tunnel
No description
23 replies
CDCloudflare Developers
Created by dhakkad on 12/5/2023 in #general-help
CORS issue on/in nodejs and react application via cloudflare tunnel
@Cyb3r-Jok3 sorry to ping you on this again, I just wanted to know whether it is possible or not, and if it is then what I am doing wrong?
23 replies
CDCloudflare Developers
Created by dhakkad on 12/5/2023 in #general-help
CORS issue on/in nodejs and react application via cloudflare tunnel
@Cyb3r-Jok3 So, I was able to get it to work using app.options() after disabling the cloudflare waf/cloudfalre access on the backend and frontend sub-domains. What I wasn't able to achieve is and what I wanted to achieve is (at least I expected that it should work but for some reason, I wasn't able to get it to work as I'm not sure atm whether it is possible or not): 1. I wanted to use cloudflare waf/cloudflare access as the protection firewall for both my backend.example.com and frontend.example.com where both are running inside the same docker-compose.yml context and served via a single coudflared container in the same context. 2. My backend doesn't have a login/api-token system so I wanted to use cloudflare's waf as a protection layer and then using another IDP in front of it without worrying about the authentication+authorization on the backend side 3. When I enabled cf's waf on both frontend.example.com and backend.example.com I never got it working, always the error about CORS, even tried leaving the CORS on application level as "allow all origins" but idk I never got it working. I wanted to ask whether the thing I was trying to achieve is actually doable/possible or not? Also, fyi/fyr for these problems and possibly my lack of knowledge currently I'm serving both frontend and backend from same origin letting me still use cf's waf and removing all the CORS related complications or misconfigurations but I'm would love to know whether and how "what I was trying to achieve is possible or not"
23 replies
CDCloudflare Developers
Created by dhakkad on 12/5/2023 in #general-help
CORS issue on/in nodejs and react application via cloudflare tunnel
If more details are required, I can provide those.
23 replies
CDCloudflare Developers
Created by dhakkad on 11/17/2023 in #d1-database
I'm not sure about this but is there a
Thanks a lot for providing insights, I'll give it a shot.
2 replies
CDCloudflare Developers
Created by dhakkad on 11/3/2023 in #pages-help
Custom domain and sub-domains stuck at verifying an initializing
All active now.
38 replies
CDCloudflare Developers
Created by dhakkad on 11/3/2023 in #pages-help
Custom domain and sub-domains stuck at verifying an initializing
So when I checked today, it was in active state but to make some changes, I had to remove both the domains and as a result, I added these back and it went to Initializing again.
38 replies