File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -2,9 +2,16 @@ import * as express from 'express';
22import * as functions from 'firebase-functions' ;
33import { declareExpressHttpRoutes } from "./functions/http/api/routes" ;
44import { extractSingleQueryParam } from "./functions/http/utils" ;
5+ import { info } from "./firebase" ;
56
67const app = express ( )
78app . use ( express . json ( ) ) ;
9+ app . use ( ( req , res , next ) => {
10+ if ( req . headers [ 'x-forwarded-host' ] && req . headers [ 'x-forwarded-host' ] . toString ( ) . endsWith ( "voxxr.in" ) && req . originalUrl . startsWith ( '/api' ) ) {
11+ req . url = req . originalUrl . substring ( "/api" . length ) ;
12+ }
13+ next ( ) ;
14+ } )
815
916// Legacy HTTP Endpoints declaration... please use declareRoutes() instead !
1017exports . hello = functions . https . onRequest ( async ( request , response ) => {
You can’t perform that action at this time.
0 commit comments