@@ -15,7 +15,6 @@ import AWS from 'aws-sdk';
1515import { app as customRoute } from './cloud/customRoute/customApp.js' ;
1616import { exec } from 'child_process' ;
1717import { createTransport } from 'nodemailer' ;
18- import { PostHog } from 'posthog-node' ;
1918import { appName , cloudServerUrl , smtpenable , smtpsecure , useLocal } from './Utils.js' ;
2019import { SSOAuth } from './auth/authadapter.js' ;
2120import createContactIndex from './migrationdb/createContactIndex.js' ;
@@ -175,16 +174,6 @@ function getUserIP(request) {
175174 return request . socket . remoteAddress ;
176175 }
177176}
178- app . use ( function ( req , res , next ) {
179- const ph_project_api_key = process . env . PH_PROJECT_API_KEY ;
180- try {
181- req . posthog = new PostHog ( ph_project_api_key ) ;
182- } catch ( err ) {
183- // console.log('Err', err);
184- req . posthog = '' ;
185- }
186- next ( ) ;
187- } ) ;
188177
189178app . use ( async function ( req , res , next ) {
190179 const isFilePath = req . path . includes ( 'files' ) || false ;
@@ -225,7 +214,6 @@ if (!process.env.TESTING) {
225214// Mount your custom express app
226215app . use ( '/' , customRoute ) ;
227216
228-
229217// Parse Server plays nicely with the rest of your web routes
230218app . get ( '/' , function ( req , res ) {
231219 res . status ( 200 ) . send ( 'opensign-server is running !!!' ) ;
0 commit comments