[CORL-867] Version SSL Bypass (#2797)

* fix: move /api/version outside SSL wrap

* chore: bump version
This commit is contained in:
Wyatt Johnson
2020-01-15 23:22:37 +00:00
committed by GitHub
parent f58f65c7ae
commit a95694dff6
4 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@coralproject/talk",
"version": "5.4.1",
"version": "5.4.2",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@coralproject/talk",
"version": "5.4.1",
"version": "5.4.2",
"author": "The Coral Project",
"homepage": "https://coralproject.net/",
"sideEffects": [
+4 -1
View File
@@ -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);
+1 -4
View File
@@ -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));