mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Replace base_uri with base_path (#10879)
DEV: Replace instances of Discourse.base_uri with Discourse.base_path
This is clearer because the base_uri is actually just a path prefix. This continues the work started in 555f467.
This commit is contained in:
committed by
GitHub
parent
5e3130ac26
commit
721ee36425
@@ -8,8 +8,8 @@
|
||||
<%- end %>
|
||||
<meta name="theme-color" content="#<%= ColorScheme.hex_for_name('header_background', scheme_id) %>">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, user-scalable=yes, viewport-fit=cover">
|
||||
<%- if Discourse.base_uri.present? %>
|
||||
<meta name="discourse-base-uri" content="<%= Discourse.base_uri %>">
|
||||
<%- if Discourse.base_path.present? %>
|
||||
<meta name="discourse-base-uri" content="<%= Discourse.base_path %>">
|
||||
<% end %>
|
||||
<%= canonical_link_tag %>
|
||||
<%= render_sitelinks_search_tag %>
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
<%= render_google_tag_manager_head_code %>
|
||||
<%= render_google_universal_analytics_code %>
|
||||
<link rel="manifest" href="<%= Discourse.base_uri %>/manifest.webmanifest" crossorigin="use-credentials">
|
||||
<link rel="manifest" href="<%= Discourse.base_path %>/manifest.webmanifest" crossorigin="use-credentials">
|
||||
|
||||
<%- if include_ios_native_app_banner? %>
|
||||
<meta name="apple-itunes-app" content="app-id=<%= SiteSetting.ios_app_id %><%= ios_app_argument %>">
|
||||
@@ -59,7 +59,7 @@
|
||||
|
||||
<%= tag.meta id: 'data-discourse-setup', data: client_side_setup_data %>
|
||||
|
||||
<%- if !current_user && (data = cookies.delete(:authentication_data, path: Discourse.base_uri("/"))) %>
|
||||
<%- if !current_user && (data = cookies.delete(:authentication_data, path: Discourse.base_path("/"))) %>
|
||||
<meta id="data-authentication" data-authentication-data="<%= data %>">
|
||||
<%- end %>
|
||||
</head>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%= @robots_info[:header] %>
|
||||
<% if Discourse.base_uri.present? %>
|
||||
<% if Discourse.base_path.present? %>
|
||||
# This robots.txt file is not used. Please append the content below in the robots.txt file located at the root
|
||||
<% end %>
|
||||
#
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
# we return the X-Robots-Tag with noindex, nofollow which will ensure
|
||||
# indexing is minimized and nothing shows up in Google search results
|
||||
User-agent: googlebot
|
||||
Allow: <%= Discourse.base_uri + "/" %>
|
||||
Disallow: <%= Discourse.base_uri + "/uploads/*" %>
|
||||
Allow: <%= Discourse.base_path + "/" %>
|
||||
Disallow: <%= Discourse.base_path + "/uploads/*" %>
|
||||
|
||||
User-agent: *
|
||||
Disallow: <%= Discourse.base_uri + "/" %>
|
||||
Disallow: <%= Discourse.base_path + "/" %>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user