From 75eecb7c66912759b342aad12fae75882044d12b Mon Sep 17 00:00:00 2001 From: Aayush Kumar Sahu Date: Thu, 6 Jun 2024 03:14:22 +0530 Subject: [PATCH] extension socket no more --- lib/accumulator/application.ex | 3 +-- lib/accumulator/origin.ex | 4 ++-- lib/accumulator_web/endpoint.ex | 6 +++--- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/accumulator/application.ex b/lib/accumulator/application.ex index 2fb902b..e9f1795 100644 --- a/lib/accumulator/application.ex +++ b/lib/accumulator/application.ex @@ -33,8 +33,7 @@ defmodule Accumulator.Application do Accumulator.Repo, {Accumulator.Scheduler.Spotify, interval: 60000}, {Accumulator.Scheduler.Pastes, interval: 3_600_000}, - {Task.Supervisor, name: Accumulator.TaskRunner}, - Accumulator.Extension + {Task.Supervisor, name: Accumulator.TaskRunner} ] # See https://hexdocs.pm/elixir/Supervisor.html diff --git a/lib/accumulator/origin.ex b/lib/accumulator/origin.ex index a3dde09..3d49d3d 100644 --- a/lib/accumulator/origin.ex +++ b/lib/accumulator/origin.ex @@ -3,8 +3,8 @@ defmodule Accumulator.Origin do def my_check_origin?(%URI{scheme: scheme, host: host} = _uri) do case scheme do - "moz-extension" -> true - "chrome-extension" -> true + # "moz-extension" -> true + # "chrome-extension" -> true "https" -> if host in @allowed_hosts, do: true, else: false _ -> false end diff --git a/lib/accumulator_web/endpoint.ex b/lib/accumulator_web/endpoint.ex index 71e57b6..bbea252 100644 --- a/lib/accumulator_web/endpoint.ex +++ b/lib/accumulator_web/endpoint.ex @@ -58,7 +58,7 @@ defmodule AccumulatorWeb.Endpoint do websocket: [connect_info: [session: @session_options]], longpoll: false - socket "/extension", AccumulatorWeb.ExtensionSocket, - websocket: true, - longpoll: false + # socket "/extension", AccumulatorWeb.ExtensionSocket, + # websocket: true, + # longpoll: false end