Https Setup
This commit is contained in:
parent
fe9562b596
commit
9ca647b326
|
|
@ -1,4 +1,4 @@
|
|||
import Fastify, { FastifyInstance, FastifyListenOptions } from "fastify";
|
||||
import Fastify, { FastifyHttpsOptions, FastifyInstance, FastifyListenOptions } from "fastify";
|
||||
import fastifyMultipart from "@fastify/multipart";
|
||||
import cors from '@fastify/cors';
|
||||
|
||||
|
|
@ -89,8 +89,23 @@ export class UserManagementServer
|
|||
|
||||
async _initializeApp():Promise<void>
|
||||
{
|
||||
|
||||
this._app = Fastify();
|
||||
if ( this._settings.isDebugMode )
|
||||
{
|
||||
this._app = Fastify();
|
||||
}
|
||||
else
|
||||
{
|
||||
this._app = Fastify(
|
||||
{
|
||||
https:
|
||||
{
|
||||
key:this._settings.httpsKeyPath,
|
||||
cert:this._settings.httpsCertPath
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
this._app.register( fastifyMultipart );
|
||||
|
||||
for ( let corsURL of this._settings.corsURLs )
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@ export class UserManagementServerSettings
|
|||
port:number = 8084;
|
||||
corsURLs:string[] = [];
|
||||
isDebugMode:boolean = false;
|
||||
httpsKeyPath:string;
|
||||
httpsCertPath:string;
|
||||
|
||||
// Paths
|
||||
rootPath:string;
|
||||
|
|
|
|||
Loading…
Reference in New Issue