stripping port information from Discourse.BaseUrl

Port information if presented in Discourse.BaseUrl may break user avatar URL in the template generation.

https://github.com/discourse/discourse/edit/master/app/assets/javascripts/discourse/models/user.js
avatarTemplate()

In the future there should be a way to reference baseUrl with or without port information
This commit is contained in:
lidlanca 2014-09-12 16:29:17 -04:00
parent 46d8db3d70
commit 33e1790408
1 changed files with 1 additions and 1 deletions

View File

@ -31,7 +31,7 @@
<script>
Discourse.CDN = '<%= Rails.configuration.action_controller.asset_host %>';
Discourse.BaseUrl = '<%= RailsMultisite::ConnectionManagement.current_hostname %>';
Discourse.BaseUrl = '<%= RailsMultisite::ConnectionManagement.current_hostname %>'.replace(/:[\d]*$/,"");
Discourse.BaseUri = '<%= Discourse::base_uri "/" %>';
Discourse.Environment = '<%= Rails.env %>';
Discourse.SiteSettings = PreloadStore.get('siteSettings');