mirror of
https://github.com/ditatompel/xmr-remote-nodes.git
synced 2025-01-08 05:52:10 +07:00
feat: Added permalink header
This commit is contained in:
parent
fb6f6c2b5c
commit
3beb3ba60e
4 changed files with 15 additions and 6 deletions
|
@ -12,6 +12,7 @@ IPV6_CAPABLE=false
|
||||||
|
|
||||||
# Server Config
|
# Server Config
|
||||||
# #############
|
# #############
|
||||||
|
APP_URL="https://xmr.ditatompel.com" # URL where user can access the web UI, don't put trailing slash
|
||||||
|
|
||||||
# Fiber Config
|
# Fiber Config
|
||||||
APP_PREFORK=false
|
APP_PREFORK=false
|
||||||
|
|
|
@ -13,6 +13,9 @@ type App struct {
|
||||||
LogLevel string
|
LogLevel string
|
||||||
|
|
||||||
// configuration for server
|
// configuration for server
|
||||||
|
URL string // URL where user can access the web UI, don't put trailing slash
|
||||||
|
|
||||||
|
// fiber specific config
|
||||||
Prefork bool
|
Prefork bool
|
||||||
Host string
|
Host string
|
||||||
Port int
|
Port int
|
||||||
|
@ -55,6 +58,9 @@ func LoadApp() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// server configuration
|
// server configuration
|
||||||
|
app.URL = os.Getenv("APP_URL")
|
||||||
|
|
||||||
|
// fiber specific config
|
||||||
app.Host = os.Getenv("APP_HOST")
|
app.Host = os.Getenv("APP_HOST")
|
||||||
app.Port, _ = strconv.Atoi(os.Getenv("APP_PORT"))
|
app.Port, _ = strconv.Atoi(os.Getenv("APP_PORT"))
|
||||||
app.Prefork, _ = strconv.ParseBool(os.Getenv("APP_PREFORK"))
|
app.Prefork, _ = strconv.ParseBool(os.Getenv("APP_PREFORK"))
|
||||||
|
|
|
@ -20,7 +20,7 @@ func (s *fiberServer) homeHandler(c *fiber.Ctx) error {
|
||||||
Description: "A website that helps you monitor your favourite Monero remote nodes, but YOU BETTER RUN AND USE YOUR OWN NODE.",
|
Description: "A website that helps you monitor your favourite Monero remote nodes, but YOU BETTER RUN AND USE YOUR OWN NODE.",
|
||||||
Keywords: "monero,monero,xmr,monero node,xmrnode,cryptocurrency,monero remote node,monero testnet,monero stagenet",
|
Keywords: "monero,monero,xmr,monero node,xmrnode,cryptocurrency,monero remote node,monero testnet,monero stagenet",
|
||||||
Robots: "INDEX,FOLLOW",
|
Robots: "INDEX,FOLLOW",
|
||||||
Permalink: "https://xmr.ditatompel.com",
|
Permalink: s.url,
|
||||||
Identifier: "/",
|
Identifier: "/",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ func (s *fiberServer) addNodeHandler(c *fiber.Ctx) error {
|
||||||
Description: "You can use this page to add known remote node to the system so my bots can monitor it.",
|
Description: "You can use this page to add known remote node to the system so my bots can monitor it.",
|
||||||
Keywords: "monero,monero node,monero public node,monero wallet,list monero node,monero node monitoring",
|
Keywords: "monero,monero node,monero public node,monero wallet,list monero node,monero node monitoring",
|
||||||
Robots: "INDEX,FOLLOW",
|
Robots: "INDEX,FOLLOW",
|
||||||
Permalink: "https://xmr.ditatompel.com/add-node",
|
Permalink: s.url + "/add-node",
|
||||||
Identifier: "/add-node",
|
Identifier: "/add-node",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ func (s *fiberServer) remoteNodesHandler(c *fiber.Ctx) error {
|
||||||
Description: "Although it's possible to use these existing public Monero nodes, you're MUST RUN AND USE YOUR OWN NODE!",
|
Description: "Although it's possible to use these existing public Monero nodes, you're MUST RUN AND USE YOUR OWN NODE!",
|
||||||
Keywords: "monero remote nodes,public monero nodes,monero public nodes,monero wallet,tor monero node,monero cors rpc",
|
Keywords: "monero remote nodes,public monero nodes,monero public nodes,monero wallet,tor monero node,monero cors rpc",
|
||||||
Robots: "INDEX,FOLLOW",
|
Robots: "INDEX,FOLLOW",
|
||||||
Permalink: "https://xmr.ditatompel.com/remote-nodes",
|
Permalink: s.url + "/remote-nodes",
|
||||||
Identifier: "/remote-nodes",
|
Identifier: "/remote-nodes",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -241,7 +241,7 @@ func (s *fiberServer) nodeHandler(c *fiber.Ctx) error {
|
||||||
Description: fmt.Sprintf("Monero %s remote node %s running on port %d", node.Nettype, node.Hostname, node.Port),
|
Description: fmt.Sprintf("Monero %s remote node %s running on port %d", node.Nettype, node.Hostname, node.Port),
|
||||||
Keywords: fmt.Sprintf("monero log,monero node log,monitoring monero log,monero,xmr,monero node,xmrnode,cryptocurrency,monero %s,%s", node.Nettype, node.Hostname),
|
Keywords: fmt.Sprintf("monero log,monero node log,monitoring monero log,monero,xmr,monero node,xmrnode,cryptocurrency,monero %s,%s", node.Nettype, node.Hostname),
|
||||||
Robots: "INDEX,FOLLOW",
|
Robots: "INDEX,FOLLOW",
|
||||||
Permalink: fmt.Sprintf("https://xmr.ditatompel.com/remote-nodes/id/%d", node.ID),
|
Permalink: s.url + "/remote-nodes/id/" + strconv.Itoa(int(node.ID)),
|
||||||
Identifier: "/remote-nodes",
|
Identifier: "/remote-nodes",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@ import (
|
||||||
type fiberServer struct {
|
type fiberServer struct {
|
||||||
*fiber.App
|
*fiber.App
|
||||||
db *database.DB
|
db *database.DB
|
||||||
|
url string
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewServer returns a new fiber server
|
// NewServer returns a new fiber server
|
||||||
|
@ -23,6 +24,7 @@ func NewServer() *fiberServer {
|
||||||
AppName: "XMR Nodes Aggregator " + config.Version,
|
AppName: "XMR Nodes Aggregator " + config.Version,
|
||||||
}),
|
}),
|
||||||
db: database.GetDB(),
|
db: database.GetDB(),
|
||||||
|
url: config.AppCfg().URL,
|
||||||
}
|
}
|
||||||
|
|
||||||
return server
|
return server
|
||||||
|
|
Loading…
Reference in a new issue