2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-27 11:06:44 +00:00

Remove trailing slash from SITE_URL (#9559) (#9560)

- ref: https://github.com/inventree/InvenTree/discussions/9552
- ref: https://stackoverflow.com/questions/56404930/when-trying-set-corsheaders-in-settings-py-file

(cherry picked from commit 527652007e934bc05476859ab3ec4fbdffb313db)

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
This commit is contained in:
github-actions[bot] 2025-04-22 12:50:17 +10:00 committed by GitHub
parent f2770f0711
commit e2a092ea04
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1095,6 +1095,7 @@ IMPORT_EXPORT_USE_TRANSACTIONS = True
SITE_URL = get_setting('INVENTREE_SITE_URL', 'site_url', None)
if SITE_URL:
SITE_URL = str(SITE_URL).strip().rstrip('/')
logger.info('Using Site URL: %s', SITE_URL)
# Check that the site URL is valid