mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-10 02:15:11 +00:00
Fixing lint, adding a few endpoints.
This commit is contained in:
parent
c1001f602a
commit
890239972f
|
@ -28,21 +28,25 @@ server.use(express.json());
|
||||||
server.use(express.urlencoded({ extended: false }));
|
server.use(express.urlencoded({ extended: false }));
|
||||||
server.use("/static", express.static(path.resolve("./dist")));
|
server.use("/static", express.static(path.resolve("./dist")));
|
||||||
|
|
||||||
const robotstxt =
|
const robotstxt = `User-Agent: *
|
||||||
`User-Agent: *
|
|
||||||
Disallow: /login
|
Disallow: /login
|
||||||
Disallow: /settings
|
Disallow: /settings
|
||||||
Disallow: /create_community
|
Disallow: /create_community
|
||||||
Disallow: /create_post
|
Disallow: /create_post
|
||||||
|
Disallow: /create_private_message
|
||||||
Disallow: /inbox
|
Disallow: /inbox
|
||||||
|
Disallow: /setup
|
||||||
|
Disallow: /admin
|
||||||
|
Disallow: /password_change
|
||||||
Disallow: /search/
|
Disallow: /search/
|
||||||
`;
|
`;
|
||||||
// server.use(cookieParser());
|
|
||||||
server.get("/robots.txt", async (req, res) => {
|
server.get("/robots.txt", async (_req, res) => {
|
||||||
res.setHeader("content-type","text/plain; charset=utf-8")
|
res.setHeader("content-type", "text/plain; charset=utf-8");
|
||||||
res.send(robotstxt)
|
res.send(robotstxt);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// server.use(cookieParser());
|
||||||
server.get("/*", async (req, res) => {
|
server.get("/*", async (req, res) => {
|
||||||
const activeRoute = routes.find(route => matchPath(req.path, route)) || {};
|
const activeRoute = routes.find(route => matchPath(req.path, route)) || {};
|
||||||
const context = {} as any;
|
const context = {} as any;
|
||||||
|
|
Loading…
Reference in a new issue