Add CSP Policy for pictures

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2022-11-04 09:26:45 +01:00
parent f5e81fab3f
commit e97206077c
3 changed files with 23 additions and 6 deletions

View File

@@ -29,8 +29,12 @@ defmodule Mobilizon.Service.Pictures.Provider do
iex> search("London")
%Information{url: "https://some_url_to.a/picture.jpeg", author: %{name: "An author", url: "https://url.to/profile"}, source: %{name: "The source name", url: "The source URL" }}
"""
@callback search(location :: String.t(), options :: keyword) ::
[Information.t()]
@callback search(location :: String.t(), options :: keyword) :: Information.t()
@doc """
The CSP configuration to add for the service to work
"""
@callback csp() :: keyword()
@spec endpoint(atom()) :: String.t()
def endpoint(provider) do