mirror of
https://github.com/wassname/talk.git
synced 2026-09-09 11:38:08 +08:00
[CORL-867] Version SSL Bypass (#2797)
* fix: move /api/version outside SSL wrap * chore: bump version
This commit is contained in:
@@ -27,7 +27,7 @@ import { PersistedQueryCache } from "coral-server/services/queries";
|
||||
import { AugmentedRedis } from "coral-server/services/redis";
|
||||
import TenantCache from "coral-server/services/tenant/cache";
|
||||
|
||||
import { healthHandler } from "./handlers";
|
||||
import { healthHandler, versionHandler } from "./handlers";
|
||||
import { compileTrust } from "./helpers";
|
||||
import { accessLogger, errorLogger } from "./middleware/logging";
|
||||
import { metricsRecorder } from "./middleware/metrics";
|
||||
@@ -75,6 +75,9 @@ export async function createApp(options: AppOptions): Promise<Express> {
|
||||
// Configure the health check endpoint.
|
||||
parent.get("/api/health", healthHandler);
|
||||
|
||||
// Configure the version route.
|
||||
parent.get("/api/version", versionHandler);
|
||||
|
||||
// Configure the SSL requirement after the health check endpoint.
|
||||
configureApplicationHTTPS(options);
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import express from "express";
|
||||
import passport from "passport";
|
||||
|
||||
import { AppOptions } from "coral-server/app";
|
||||
import { graphQLHandler, versionHandler } from "coral-server/app/handlers";
|
||||
import { graphQLHandler } from "coral-server/app/handlers";
|
||||
import { JSONErrorHandler } from "coral-server/app/middleware/error";
|
||||
import { persistedQueryMiddleware } from "coral-server/app/middleware/graphql";
|
||||
import { jsonMiddleware } from "coral-server/app/middleware/json";
|
||||
@@ -29,9 +29,6 @@ export function createAPIRouter(app: AppOptions, options: RouterOptions) {
|
||||
// Create a router.
|
||||
const router = express.Router();
|
||||
|
||||
// Configure the version route.
|
||||
router.get("/version", versionHandler);
|
||||
|
||||
// Installation router.
|
||||
router.use("/install", createNewInstallRouter(app));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user