2 Commits

Author SHA1 Message Date
4cde4c8f67 fix filtering ignored posts 2024-08-20 14:02:40 +02:00
d497eaa522 debug check_origin on render 2024-08-14 11:13:08 +02:00
2 changed files with 11 additions and 2 deletions

View File

@ -48,7 +48,11 @@ if config_env() == :prod do
You can generate one by calling: mix phx.gen.secret You can generate one by calling: mix phx.gen.secret
""" """
host = System.get_env("PHX_HOST") || "example.com" host =
System.get_env("PHX_HOST") ||
"example.com"
|> IO.inspect()
port = String.to_integer(System.get_env("PORT") || "4000") port = String.to_integer(System.get_env("PORT") || "4000")
config :something_erlang, :dns_cluster_query, System.get_env("DNS_CLUSTER_QUERY") config :something_erlang, :dns_cluster_query, System.get_env("DNS_CLUSTER_QUERY")
@ -63,6 +67,7 @@ if config_env() == :prod do
ip: {0, 0, 0, 0, 0, 0, 0, 0}, ip: {0, 0, 0, 0, 0, 0, 0, 0},
port: port port: port
], ],
check_origin: [host],
secret_key_base: secret_key_base secret_key_base: secret_key_base
# ## SSL Support # ## SSL Support

View File

@ -35,7 +35,11 @@ defmodule SomethingErlang.AwfulApi.Thread do
end end
posts = posts =
for post <- Meeseeks.all(thread, css("table.post:not(.ignored)")) do for post <- Meeseeks.all(thread, css("table.post")),
post
|> Meeseeks.attr("class")
|> String.contains?("ignored")
|> Kernel.not() do
%{ %{
userinfo: userinfo(post), userinfo: userinfo(post),
postdate: postdate(post), postdate: postdate(post),