-
Notifications
You must be signed in to change notification settings - Fork 322
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gluon-status-page-api: merge back into gluon-status-page
All Access-Control-Allow-Origin are removed to improve users' privacy. As the status page API is thus not useful without the status page anymore, merge them back into a single package. The status-page-api respondd provider is removed as well. Fixes #1194
- Loading branch information
Showing
17 changed files
with
44 additions
and
167 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
package/gluon-status-page-api/files/lib/gluon/status-page/www/cgi-bin/nodeinfo
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
package/gluon-status-page-api/files/lib/gluon/upgrade/500-status-page-api
This file was deleted.
Oops, something went wrong.
24 changes: 0 additions & 24 deletions
24
package/gluon-status-page-api/luasrc/lib/gluon/status-page/www/cgi-bin/interfaces
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
package/gluon-status-page-api/luasrc/lib/gluon/upgrade/981-firewall-status-page
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
...us-page/www/cgi-bin/dyn/neighbours-batadv → ...us-page/www/cgi-bin/dyn/neighbours-batadv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
#!/bin/sh | ||
|
||
echo 'Access-Control-Allow-Origin: *' | ||
|
||
CMD='exec /lib/gluon/status-page/providers/neighbours-batadv' | ||
|
||
exec /usr/sbin/sse-multiplex "$CMD" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
...on/status-page/www/cgi-bin/dyn/statistics → ...on/status-page/www/cgi-bin/dyn/statistics
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
#!/bin/sh | ||
|
||
echo 'Access-Control-Allow-Origin: *' | ||
|
||
CMD='exec gluon-neighbour-info -s "" -l -d ::1 -p 1001 -t 3 -r statistics' | ||
|
||
exec /usr/sbin/sse-multiplex "$CMD" |
File renamed without changes.
File renamed without changes.
38 changes: 38 additions & 0 deletions
38
package/gluon-status-page/luasrc/lib/gluon/upgrade/500-status-page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/usr/bin/lua | ||
|
||
local uci = require('simple-uci').cursor() | ||
|
||
|
||
local function get_mem_total() | ||
for line in io.lines('/proc/meminfo') do | ||
local match = line:match('^MemTotal:%s+(%d+)') | ||
if match then | ||
return tonumber(match) | ||
end | ||
end | ||
end | ||
|
||
local max_requests = 32 | ||
if get_mem_total() < 48*1024 then | ||
max_requests = 16 | ||
end | ||
|
||
uci:section('uhttpd', 'uhttpd', 'main', { | ||
listen_http = { '0.0.0.0:80', '[::]:80' }, | ||
listen_https = {}, | ||
|
||
home = '/lib/gluon/status-page/www', | ||
max_requests = max_requests, | ||
}) | ||
uci:save('uhttpd') | ||
|
||
|
||
for _, zone in ipairs({'mesh', 'local_client'}) do | ||
uci:section('firewall', 'rule', zone .. '_http', { | ||
src = zone, | ||
dest_port = '80', | ||
proto = 'tcp', | ||
target = 'ACCEPT', | ||
}) | ||
end | ||
uci:save('firewall') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.