Skip to content

Commit

Permalink
extension socket no more
Browse files Browse the repository at this point in the history
  • Loading branch information
aayushmau5 committed Jun 5, 2024
1 parent caff5da commit 75eecb7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions lib/accumulator/application.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions lib/accumulator/origin.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions lib/accumulator_web/endpoint.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 75eecb7

Please sign in to comment.