my router have a static ip address and my server where i run my apps have a local ip and just forwarding the ports but potato don't want to work with port forwarding and i get this error "Host not permitted".
what do i need to change?
Thank's
Aurel.
i have found in logs this: WARN -- : attack prevented by Rack::Protection::HostAuthorization
Hi,
i have the following problem...
my router have a static ip address and my server where i run my apps have a local ip and just forwarding the ports but potato don't want to work with port forwarding and i get this error "Host not permitted".
what do i need to change?
Thank's
Aurel.
-------
i have found in logs this: WARN -- : attack prevented by Rack::Protection::HostAuthorization
<!-- github-sync-id:3498349767 -->
configure do
set :host_authorization, { permitted_hosts: [] } # effectively disables the check
end
in app.rb
for the moment i resolved with
configure do
set :host_authorization, { permitted_hosts: [] } # effectively disables the check
end
in app.rb
<!-- github-comment-id:3388552622 -->
Do I understand correctly your server is behind a router with port forwarding and the Sinatra web app rejects requests for "security reasons"? I can prepare a patch.
Thank you for reporting. I can look into this.
Do I understand correctly your server is behind a router with port forwarding and the Sinatra web app rejects requests for "security reasons"? I can prepare a patch.
<!-- github-comment-id:3393010975 -->
It seems to be because the Sinatra application is in "development" mode by default. By the behavior below, it seems to only accept connections from RFC1918 IP-addresses but not from the internet when in development.
I used the variable export APP_ENV="production" to change it into accepting external requests.
My instance is running behind a reverse proxy (HAproxy) working great serving the internet.
== Sinatra (v4.1.1) has taken the stage on 41447 for development with backup from Puma
Puma starting in single mode...
I added a **Production** section to the readme.
https://github.com/l5yth/potato-mesh?tab=readme-ov-file#production
This also works behind nginx reverse proxy.
<!-- github-comment-id:3393395748 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Hi,
i have the following problem...
my router have a static ip address and my server where i run my apps have a local ip and just forwarding the ports but potato don't want to work with port forwarding and i get this error "Host not permitted".
what do i need to change?
Thank's
Aurel.
i have found in logs this: WARN -- : attack prevented by Rack::Protection::HostAuthorization
for the moment i resolved with
configure do
set :host_authorization, { permitted_hosts: [] } # effectively disables the check
end
in app.rb
Thank you for reporting. I can look into this.
Do I understand correctly your server is behind a router with port forwarding and the Sinatra web app rejects requests for "security reasons"? I can prepare a patch.
It seems to be because the Sinatra application is in "development" mode by default. By the behavior below, it seems to only accept connections from RFC1918 IP-addresses but not from the internet when in development.
I used the variable export APP_ENV="production" to change it into accepting external requests.
My instance is running behind a reverse proxy (HAproxy) working great serving the internet.
== Sinatra (v4.1.1) has taken the stage on 41447 for development with backup from Puma
Puma starting in single mode...
Use Ctrl-C to stop
W, [2025-10-11T14:39:19.963428 #319005] WARN -- : attack prevented by Rack::Protection::HostAuthorization
183.156.162.222 - - [11/Oct/2025:14:39:19 +0000] "POST /api/telemetry HTTP/1.1" 403 - 0.0009
W, [2025-10-11T14:39:23.757813 #319005] WARN -- : attack prevented by Rack::Protection::HostAuthorization
183.156.162.222 - - [11/Oct/2025:14:39:23 +0000] "GET /api/nodes?limit=1000 HTTP/1.1" 403 - 0.0007
W, [2025-10-11T14:39:23.760013 #319005] WARN -- : attack prevented by Rack::Protection::HostAuthorization
183.156.162.222 - - [11/Oct/2025:14:39:23 +0000] "GET /api/neighbors?limit=1000 HTTP/1.1" 403 - 0.0038
W, [2025-10-11T14:39:23.763348 #319005] WARN -- : attack prevented by Rack::Protection::HostAuthorization
183.156.162.222 - - [11/Oct/2025:14:39:23 +0000] "GET /api/messages?limit=1000 HTTP/1.1" 403 - 0.0013
W, [2025-10-11T14:39:23.762089 #319005] WARN -- : attack prevented by Rack::Protection::HostAuthorization
183.156.162.222 - - [11/Oct/2025:14:39:23 +0000] "GET /api/telemetry?limit=1000 HTTP/1.1" 403 - 0.0029
W, [2025-10-11T14:39:23.763934 #319005] WARN -- : attack prevented by Rack::Protection::HostAuthorization
188.148.17.242 - - [11/Oct/2025:14:39:23 +0000] "GET /api/positions?limit=1000 HTTP/1.1" 403 - 0.0015
192.168.2.103 - - [11/Oct/2025:14:39:29 +0000] "GET / HTTP/1.1" 200 103675 0.1048
192.168.2.103 - - [11/Oct/2025:14:39:29 +0000] "GET / HTTP/1.1" 200 103675 0.1053
192.168.2.103 - - [11/Oct/2025:14:39:29 +0000] "GET /potatomesh-logo.svg HTTP/1.1" 304 - 0.0004
192.168.2.103 - - [11/Oct/2025:14:39:29 +0000] "GET /potatomesh-logo.svg HTTP/1.1" 304 - 0.0008
192.168.2.103 - - [11/Oct/2025:14:39:29 +0000] "GET /api/neighbors?limit=1000 HTTP/1.1" 200 2 0.0675
192.168.2.103 - - [11/Oct/2025:14:39:29 +0000] "GET /api/neighbors?limit=1000 HTTP/1.1" 200 2 0.0687
I added a Production section to the readme.
https://github.com/l5yth/potato-mesh?tab=readme-ov-file#production
This also works behind nginx reverse proxy.
Minimal production example: