Commit bb78b161 authored by nanahira's avatar nanahira

add title

parent 09bd30ed
Pipeline #358 failed with stages
in 6 minutes and 45 seconds
...@@ -5,6 +5,7 @@ ssl: ...@@ -5,6 +5,7 @@ ssl:
key: ./ssl/privkey.pem key: ./ssl/privkey.pem
trustedProxies: trustedProxies:
- 127.0.0.1 - 127.0.0.1
title: Railgun
groups: groups:
- name: Ladder Policy - name: Ladder Policy
description: Determine the routing of ladder. description: Determine the routing of ladder.
......
...@@ -25,6 +25,7 @@ export interface Config { ...@@ -25,6 +25,7 @@ export interface Config {
port: number, port: number,
ssl: SSLOptions, ssl: SSLOptions,
trustedProxies: string[] trustedProxies: string[]
title: string,
groups: Group[] groups: Group[]
} }
......
...@@ -22,7 +22,7 @@ async function main() { ...@@ -22,7 +22,7 @@ async function main() {
app.get("/api/get", async (req: express.Request, res: express.Response) => { app.get("/api/get", async (req: express.Request, res: express.Response) => {
const addr = req.ip; const addr = req.ip;
const groups = await selector.get(addr); const groups = await selector.get(addr);
res.json({ ip: addr, groups }); res.json({ ip: addr, title: config.title, groups });
}); });
app.post("/api/add", async (req: express.Request, res: express.Response) => { app.post("/api/add", async (req: express.Request, res: express.Response) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment