sanitize aliases response, hide delete button for non-prefereable domain aliases
This commit is contained in:
22
src/app.ts
22
src/app.ts
@@ -1,3 +1,4 @@
|
||||
import { randomUUID } from "crypto";
|
||||
import { feathers } from "@feathersjs/feathers";
|
||||
import express, {
|
||||
rest,
|
||||
@@ -16,12 +17,11 @@ import RedisStore from "connect-redis";
|
||||
import { createClient } from "redis";
|
||||
import config from "config";
|
||||
import type { Application } from "./declarations";
|
||||
|
||||
import { logger } from "./logger";
|
||||
import { logError } from "./hooks/log-error";
|
||||
import { services } from "./services/index";
|
||||
import { channels } from "./channels";
|
||||
import { randomUUID } from "crypto";
|
||||
import { Env, getEnv } from "./helpers/get-env";
|
||||
|
||||
const app: Application = express(feathers());
|
||||
|
||||
@@ -35,14 +35,20 @@ app.use(
|
||||
);
|
||||
|
||||
app.use(cookieParser());
|
||||
|
||||
const sessionStore =
|
||||
getEnv() === Env.prod
|
||||
? new RedisStore({
|
||||
prefix: "walias:",
|
||||
client: createClient({
|
||||
url: config.get("redis.url"),
|
||||
}),
|
||||
})
|
||||
: undefined;
|
||||
|
||||
app.use(
|
||||
session({
|
||||
store: new RedisStore({
|
||||
prefix: "walias:",
|
||||
client: createClient({
|
||||
url: config.get("redis.url"),
|
||||
}),
|
||||
}),
|
||||
store: sessionStore,
|
||||
secret: randomUUID(),
|
||||
resave: false,
|
||||
saveUninitialized: false,
|
||||
|
Reference in New Issue
Block a user