logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git

restrict_indexing.ex (593B)


  1. # Pleroma: A lightweight social networking server
  2. # Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
  3. # SPDX-License-Identifier: AGPL-3.0-only
  4. defmodule Pleroma.Web.Metadata.Providers.RestrictIndexing do
  5. @behaviour Pleroma.Web.Metadata.Providers.Provider
  6. @moduledoc """
  7. Restricts indexing of remote and/or non-discoverable users.
  8. """
  9. @impl true
  10. def build_tags(%{user: %{local: true, is_discoverable: true}}), do: []
  11. def build_tags(_) do
  12. [
  13. {:meta,
  14. [
  15. name: "robots",
  16. content: "noindex, noarchive"
  17. ], []}
  18. ]
  19. end
  20. end