Commit 04d2b19e authored by feld's avatar feld
Browse files

Standardize construction of websocket URL

This follows up on the change made in d747bd98
parent d107919b
Pipeline #11327 failed with stages
in 5 minutes and 55 seconds
......@@ -35,7 +35,7 @@ defmodule Pleroma.Plugs.HTTPSecurityPlug do
defp csp_string do
scheme = Config.get([Pleroma.Web.Endpoint, :url])[:scheme]
static_url = Pleroma.Web.Endpoint.static_url()
websocket_url = String.replace(static_url, "http", "ws")
websocket_url = Pleroma.Web.Endpoint.websocket_url()
connect_src = "connect-src 'self' #{static_url} #{websocket_url}"
......@@ -1296,7 +1296,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
meta: %{
String.replace(Pleroma.Web.Endpoint.static_url(), "http", "ws"),
access_token: token,
locale: "en",
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment