Forceu / barcodebuddy

Barcode system for Grocy
GNU Affero General Public License v3.0
433 stars 58 forks source link

prefer BASEURL in getApiUrl #225

Open M0ses opened 1 year ago

M0ses commented 1 year ago

This patch should fix the problem that "Add mobile app" is showing the "calculated" URL using '$_SERVER' variables but ignoring 'BASEURL' from the config.php.

Without this patch, systems behind a reverse proxy are exposing their internal settings and do not generate a URL containing the "official" domain/url

M0ses commented 1 year ago

Maybe my patch could be improved a bit, because ATM it uses the BASEURL from the database BBConfig table.