mirror of
https://github.com/ershisan99/coolify.git
synced 2025-12-17 12:33:06 +00:00
update webhook
This commit is contained in:
@@ -394,7 +394,8 @@ export async function proxyConfiguration(request: FastifyRequest<OnlyId>, remote
|
|||||||
destinationDockerId,
|
destinationDockerId,
|
||||||
settings,
|
settings,
|
||||||
basicAuthUser,
|
basicAuthUser,
|
||||||
basicAuthPw
|
basicAuthPw,
|
||||||
|
settings: { basicAuth: isBasicAuthEnabled }
|
||||||
} = application;
|
} = application;
|
||||||
if (!destinationDockerId) {
|
if (!destinationDockerId) {
|
||||||
continue;
|
continue;
|
||||||
@@ -408,7 +409,7 @@ export async function proxyConfiguration(request: FastifyRequest<OnlyId>, remote
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
let httpBasicAuth = null;
|
let httpBasicAuth = null;
|
||||||
if (basicAuthUser && basicAuthPw) {
|
if (basicAuthUser && basicAuthPw && isBasicAuthEnabled) {
|
||||||
httpBasicAuth = {
|
httpBasicAuth = {
|
||||||
basicAuth: {
|
basicAuth: {
|
||||||
users: [basicAuthUser + ':' + await hashPassword(basicAuthPw, 1)]
|
users: [basicAuthUser + ':' + await hashPassword(basicAuthPw, 1)]
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ import { proxyConfiguration, otherProxyConfiguration } from './handlers';
|
|||||||
import { OtherProxyConfiguration } from './types';
|
import { OtherProxyConfiguration } from './types';
|
||||||
|
|
||||||
const root: FastifyPluginAsync = async (fastify): Promise<void> => {
|
const root: FastifyPluginAsync = async (fastify): Promise<void> => {
|
||||||
fastify.get<OnlyId>('/main.json', async (request, reply) => proxyConfiguration(request, false));
|
fastify.get<OnlyId>('/main.json', async (request) => proxyConfiguration(request, false));
|
||||||
fastify.get<OnlyId>('/remote/:id', async (request) => proxyConfiguration(request, true));
|
fastify.get<OnlyId>('/remote/:id', async (request) => proxyConfiguration(request, true));
|
||||||
fastify.get<OtherProxyConfiguration>('/other.json', async (request, reply) =>
|
fastify.get<OtherProxyConfiguration>('/other.json', async (request) =>
|
||||||
otherProxyConfiguration(request)
|
otherProxyConfiguration(request)
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user