Have you inspected the logs in storage/logs/laravel.log for any errors? - YES, see screenshot below.
Describe the bug
When the domain that IN uses is proxied in Cloudlfare (setup to use Full Strict SSL with Origin Certifcate) the only way to access IN is via a web browser and answer the “Verify you are human” Cloudflare challenge by checking a box.
This in turn prevents BOTH the iOS and MacOS IN apps from being able to access the IN interface!
The SnapPDF generator / viewer is also not working and not rendering invoices!
See screenshots below…
Steps To Reproduce
Place the domain record (“A” or “CNAME”) that IN uses (i.e: invoice.doman.com) in proxy mode in Cloudlfare, enable Strict Full SSL, and use a Cloudflare Origin Certificate on the hosting platform.
Expected Behavior
iOS and MacOS Apps need to add support for Cloudflare “human” prompt!
Additional context
I have already added the line below to .env but it made no difference:
TRUSTED_PROXIES=*
Since this is a common self-hosted setup (Placing IN behind the Cloudflare Proxy) I am hoping the fixes to the iOS and macOS Apps can be deployed quickly.
If there is any other workaround meantime, kindly advise…
I dont doubt it, but as security becomes more important more and more self-hosting is done behind proxying, and Cloudflare is one of the biggest providers so apps will need support for it.
Untill that happens, I did some research and found that one could use WAF Custom Rules to Skip challenges on API paths. Bot Fight Mode sometimes respects path-based skips for API traffic, especially if the challenge is triggered later.
Action: Skip → Choose “Managed Rules”, “Bot Fight Mode” (if listed), and other relevant components.
And add another for auth/login if needed: (http.request.uri.path contains “/login”)
This should allow app API calls through, while challenging web UI traffic.
The concern with all that is properly matching onto the request formats of the iOS and macOS apps, which are not obvious without access to the code base.
Could you provide the correct syntax that matches your apps for both request and auth/login so I can try this?
OK, so you confirm that the the expression: (http.request.uri.path contains “/api/v1/”) matches your apps? What about the syntax of the auth/login (http.request.uri.path contains “/login”) ?
No luck, apps wont load tho the log show a Skip on matching regex.
I will now look into scripting an IP access rule but this is still not very practical and I am hoping you can eventually add the bot challenge response capability in the IOS and macOS Apps…