Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit 650fb43

Browse files
committed
build: production
1 parent 96f57b9 commit 650fb43

File tree

5 files changed

+3
-3
lines changed

5 files changed

+3
-3
lines changed
-13 Bytes
Binary file not shown.

lib/helper/parse_remote_ip.ex

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ defmodule Helper.RemoteIP do
66
# remote ip is the fisrt ip in the proxy_ips chain
77
def parse([proxy_ips, _]) do
88
client_ip = proxy_ips |> String.split(",") |> List.first()
9+
910
case client_ip not in slb_ips do
1011
true ->
1112
{:ok, client_ip}
@@ -20,6 +21,7 @@ defmodule Helper.RemoteIP do
2021
end
2122

2223
defp slb_ips do
24+
# ecs / slbs ips
2325
["47.100.162.182"]
2426
end
2527
end

lib/mastani_server_web/context.ex

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ defmodule MastaniServerWeb.Context do
3030
{:ok, cur_user} <- authorize(token) do
3131
case RemoteIP.parse(get_req_header(conn, "x-forwarded-for")) do
3232
{:ok, remote_ip} ->
33-
IO.inspect(remote_ip, label: "get remote ip")
3433
%{cur_user: cur_user, remote_ip: remote_ip}
3534

3635
{:error, _} ->

lib/mastani_server_web/resolvers/accounts_resolver.ex

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ defmodule MastaniServerWeb.Resolvers.Accounts do
2525
def session_state(_root, _args, %{context: %{cur_user: cur_user, remote_ip: remote_ip}}) do
2626
# 1. store remote_ip
2727
# 2. subscribe home community if not
28-
IO.inspect(remote_ip, label: "session_state resolver")
2928
Accounts.update_geo(cur_user, remote_ip)
3029
CMS.subscribe_default_community_ifnot(cur_user, remote_ip)
3130
{:ok, %{is_valid: true, user: cur_user}}

lib/mastani_server_web/schema/cms/cms_queries.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ defmodule MastaniServerWeb.Schema.CMS.Queries do
4343
@desc "get community geo cities info"
4444
field :community_geo_info, list_of(:geo_info) do
4545
arg(:id, non_null(:id))
46-
arg(:raw, :id)
46+
arg(:raw, :string)
4747

4848
resolve(&R.CMS.community_geo_info/3)
4949
end

0 commit comments

Comments
 (0)