mirror of https://github.com/langgenius/dify.git
feat: remove end slash in request.host_url
This commit is contained in:
parent
f1925f0d82
commit
dd557c1771
|
|
@ -56,7 +56,7 @@ class App(db.Model):
|
|||
|
||||
@property
|
||||
def api_base_url(self):
|
||||
return (current_app.config['API_URL'] if current_app.config['API_URL'] else request.host_url) + '/v1'
|
||||
return (current_app.config['API_URL'] if current_app.config['API_URL'] else request.host_url.rstrip('/')) + '/v1'
|
||||
|
||||
@property
|
||||
def tenant(self):
|
||||
|
|
@ -505,7 +505,7 @@ class Site(db.Model):
|
|||
|
||||
@property
|
||||
def app_base_url(self):
|
||||
return (current_app.config['APP_URL'] if current_app.config['APP_URL'] else request.host_url) + '/v1'
|
||||
return (current_app.config['APP_URL'] if current_app.config['APP_URL'] else request.host_url.rstrip('/')) + '/v1'
|
||||
|
||||
|
||||
class ApiToken(db.Model):
|
||||
|
|
|
|||
|
|
@ -154,9 +154,13 @@ services:
|
|||
restart: always
|
||||
environment:
|
||||
EDITION: SELF_HOSTED
|
||||
# The base URL of console application, refers to the Console base URL of WEB service.
|
||||
# The base URL of console application, refers to the Console base URL of WEB service if console domain is
|
||||
# different from api or web app domain.
|
||||
# example: http://cloud.dify.ai
|
||||
CONSOLE_URL: ''
|
||||
# The URL for Web APP, refers to the Web App base URL of WEB service.
|
||||
# The URL for Web APP, refers to the Web App base URL of WEB service if web app domain is different from
|
||||
# console or api domain.
|
||||
# example: http://udify.app
|
||||
APP_URL: ''
|
||||
|
||||
# The postgres database.
|
||||
|
|
|
|||
Loading…
Reference in New Issue