diff --git a/assets/js/burger.ts b/assets/js/burger.ts index 4801e342..d82d032f 100644 --- a/assets/js/burger.ts +++ b/assets/js/burger.ts @@ -29,15 +29,12 @@ function close(burger: HTMLElement, content: HTMLElement, body: HTMLElement, roo }, 300); } -function copyArtistLinksTo(burger: HTMLElement) { +function copyUserLinksTo(burger: HTMLElement) { const copy = (links: HTMLCollection) => { burger.appendChild(document.createElement('hr')); - for (let i = 0; i < links.length; i++) { - // If we're here, this should not be null. - const link = assertNotNull(links.item(i)); + for (const link of links) { const burgerLink = link.cloneNode(true) as HTMLElement; - burgerLink.className = ''; burger.appendChild(burgerLink); } @@ -54,7 +51,7 @@ export function setupBurgerMenu() { const body = document.body; const root = document.documentElement; - copyArtistLinksTo(burger); + copyUserLinksTo(burger); toggle.addEventListener('click', event => { event.stopPropagation(); diff --git a/docker-compose.yml b/docker-compose.yml index 369705b4..801c1e30 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,3 @@ -version: '3' volumes: postgres_data: {} opensearch_data: {} diff --git a/lib/philomena_web/controllers/api/json/image_controller.ex b/lib/philomena_web/controllers/api/json/image_controller.ex index a142aeb4..82a0068b 100644 --- a/lib/philomena_web/controllers/api/json/image_controller.ex +++ b/lib/philomena_web/controllers/api/json/image_controller.ex @@ -41,6 +41,8 @@ defmodule PhilomenaWeb.Api.Json.ImageController do case Images.create_image(attributes, image_params) do {:ok, %{image: image}} -> + image = Repo.preload(image, tags: :aliases) + PhilomenaWeb.Endpoint.broadcast!( "firehose", "image:create", diff --git a/lib/philomena_web/plugs/content_security_policy_plug.ex b/lib/philomena_web/plugs/content_security_policy_plug.ex index c23ca236..786cf476 100644 --- a/lib/philomena_web/plugs/content_security_policy_plug.ex +++ b/lib/philomena_web/plugs/content_security_policy_plug.ex @@ -34,8 +34,7 @@ defmodule PhilomenaWeb.ContentSecurityPolicyPlug do {:form_action, ["'self'"]}, {:manifest_src, ["'self'"]}, {:img_src, ["'self'", "blob:", "data:", cdn_uri, camo_uri]}, - {:media_src, ["'self'", "blob:", "data:", cdn_uri, camo_uri]}, - {:block_all_mixed_content, []} + {:media_src, ["'self'", "blob:", "data:", cdn_uri, camo_uri]} ] csp_value =