mirror of
https://github.com/plausible/analytics.git
synced 2024-12-28 12:01:39 +03:00
53f94a9f82
* Migration: Shield page rules * Add Ecto schema for Page Rules * Add Page Rule cache * Fix typo * BTW: Use already imported function * Extend Shields context interface + split existing tests * Ingestion: filter matching patches + refactor shield actions * Add LV section for adding Page Rules * Validate max page path length * Put Pages Shield behind a feature flag * Update CHANGELOG * Update docs link anchor As per https://github.com/plausible/docs/pull/477 * Update lib/plausible/shields.ex Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com> * Update lib/plausible_web/live/shields/page_rules.ex Co-authored-by: ruslandoga <doga.ruslan@gmail.com> * Update lib/plausible_web/live/shields/page_rules.ex Co-authored-by: ruslandoga <doga.ruslan@gmail.com> --------- Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com> Co-authored-by: ruslandoga <doga.ruslan@gmail.com>
25 lines
645 B
Plaintext
25 lines
645 B
Plaintext
<%= case @shield do %>
|
|
<% "ip_addresses" -> %>
|
|
<%= live_render(@conn, PlausibleWeb.Live.Shields.IPAddresses,
|
|
session: %{
|
|
"site_id" => @site.id,
|
|
"domain" => @site.domain,
|
|
"remote_ip" => PlausibleWeb.RemoteIP.get(@conn)
|
|
}
|
|
) %>
|
|
<% "countries" -> %>
|
|
<%= live_render(@conn, PlausibleWeb.Live.Shields.Countries,
|
|
session: %{
|
|
"site_id" => @site.id,
|
|
"domain" => @site.domain
|
|
}
|
|
) %>
|
|
<% "pages" -> %>
|
|
<%= live_render(@conn, PlausibleWeb.Live.Shields.Pages,
|
|
session: %{
|
|
"site_id" => @site.id,
|
|
"domain" => @site.domain
|
|
}
|
|
) %>
|
|
<% end %>
|