mirror of
https://github.com/logto-io/logto.git
synced 2025-02-17 22:04:19 -05:00
feat(core): support trusting TLS offloading proxies config
This commit is contained in:
parent
d54f77d78a
commit
e63e5bae4e
2 changed files with 7 additions and 1 deletions
3
packages/core/src/env/consts.ts
vendored
3
packages/core/src/env/consts.ts
vendored
|
@ -5,3 +5,6 @@ export const isProduction = getEnv('NODE_ENV') === 'production';
|
|||
export const port = Number(getEnv('PORT', '3001'));
|
||||
export const mountedApps = Object.freeze(['api', 'oidc']);
|
||||
export const developmentUserId = getEnv('DEVELOPMENT_USER_ID');
|
||||
|
||||
// Trusting TLS offloading proxies: https://github.com/panva/node-oidc-provider/blob/main/docs/README.md#trusting-tls-offloading-proxies
|
||||
export const trustingTlsOffloadingProxies = getEnv('TRUSTING_TLS_OFFLOADING_PROXIES') === 'true';
|
||||
|
|
|
@ -7,9 +7,12 @@ import Koa from 'koa';
|
|||
dotenv.config();
|
||||
|
||||
import initApp from './app/init';
|
||||
import { trustingTlsOffloadingProxies } from './env/consts';
|
||||
import initI18n from './i18n/init';
|
||||
|
||||
const app = new Koa();
|
||||
const app = new Koa({
|
||||
proxy: trustingTlsOffloadingProxies,
|
||||
});
|
||||
|
||||
(async () => {
|
||||
try {
|
||||
|
|
Loading…
Add table
Reference in a new issue