|
|
@@ -8,6 +8,7 @@ import {
|
|
|
} from "./controllers/validateBodyController";
|
|
|
import * as auth from "../handlers/auth";
|
|
|
import * as link from "./controllers/linkController";
|
|
|
+import env from "../env";
|
|
|
|
|
|
const router = Router();
|
|
|
|
|
|
@@ -16,7 +17,7 @@ router.post(
|
|
|
"/url/submit",
|
|
|
cors(),
|
|
|
asyncHandler(auth.apikey),
|
|
|
- asyncHandler(auth.jwtLoose),
|
|
|
+ asyncHandler(env.DISALLOW_ANONYMOUS_LINKS ? auth.jwt : auth.jwtLoose),
|
|
|
asyncHandler(auth.recaptcha),
|
|
|
asyncHandler(validateUrl),
|
|
|
asyncHandler(ipCooldownCheck),
|