URL generation and configuration

This commit is contained in:
Uku Taht 2020-05-28 10:41:09 +03:00
parent 3b3d4d41b0
commit 7916e6f44e
3 changed files with 4 additions and 4 deletions

View File

@ -19,7 +19,7 @@ config :plausible, :clickhouse,
config :plausible, PlausibleWeb.Endpoint,
url: [
host: System.get_env("HOST", "localhost"),
port: String.to_integer(System.get_env("PORT", "8000"))
scheme: System.get_env("SCHEME", "http")
],
http: [
port: String.to_integer(System.get_env("PORT", "8000"))

View File

@ -3,8 +3,8 @@
<ol class="list-disc pl-4 my-4">
<li>Go to your DNS providers website</li>
<li class="mt-4">Create a new CNAME record for <code><%= @site.custom_domain.domain %></code></li>
<li class="mt-4">Point the record to <code>custom.<%= plausible_url() %>.</code> (including the dot)</li>
<li class="mt-4">Point the record to <code>custom.<%= base_domain() %>.</code> (including the dot)</li>
</ol>
<%= link("Done ->", to: "/sites/#{URI.encode_www_form(@site.domain)}/custom-domains/snippet", class: "button w-full mt-6") %>
</div>
</div>

View File

@ -35,7 +35,7 @@
<%= if @site.public do %>
Stats for <%= @site.domain %> are currently <b>public</b>. Anyone with the following link can view the stats:
<div class="relative text-sm mt-4">
<input type="text" id="public-link" value="<%= base_domain() <> "/" <> URI.encode_www_form(@site.domain)%>" class="transition bg-gray-100 appearance-none border border-transparent rounded w-full p-2 pr-16 text-gray-700 appearance-none focus:outline-none" />
<input type="text" id="public-link" value="<%= plausible_url() <> "/" <> URI.encode_www_form(@site.domain)%>" class="transition bg-gray-100 appearance-none border border-transparent rounded w-full p-2 pr-16 text-gray-700 appearance-none focus:outline-none" />
<a onclick="var input = document.getElementById('public-link'); input.focus(); input.select(); document.execCommand('copy');" href="javascript:void(0)" class="absolute right-0 text-indigo-700 font-bold p-2">
<svg class="feather-sm"><use xlink:href="#feather-copy" /></svg>
</a>