mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-15 19:52:54 -06:00
Fix isURL function to by pass url with localhost, when webhook is enable
This commit is contained in:
parent
83ed0e6454
commit
f32e259d2f
@ -1,15 +0,0 @@
|
||||
import nodeWindows from 'node-windows';
|
||||
import path from 'path';
|
||||
|
||||
const svc = new nodeWindows.Service({
|
||||
name: 'EvolutionAPIServer',
|
||||
description:
|
||||
'WhatsApp-Api-NodeJs - This project is based on the CodeChat. The original project is an implementation of Baileys',
|
||||
script: path.join(__dirname, 'main.js'),
|
||||
});
|
||||
|
||||
svc.on('install', () => {
|
||||
svc.start();
|
||||
});
|
||||
|
||||
svc.install();
|
@ -1,16 +0,0 @@
|
||||
import nodeWindows from 'node-windows';
|
||||
import path from 'path';
|
||||
|
||||
const svc = new nodeWindows.Service({
|
||||
name: 'EvolutionAPIServer',
|
||||
description:
|
||||
'WhatsApp-Api-NodeJs - This project is based on the CodeChat. The original project is an implementation of Baileys',
|
||||
script: path.join(__dirname, 'main.js'),
|
||||
});
|
||||
|
||||
svc.on('uninstall', () => {
|
||||
console.log('Uninstall complete.');
|
||||
console.log('The service exists: ', svc.exists);
|
||||
});
|
||||
|
||||
svc.uninstall();
|
@ -453,7 +453,7 @@ export class WAStartupService {
|
||||
}
|
||||
|
||||
try {
|
||||
if (this.localWebhook.enabled && isURL(this.localWebhook.url)) {
|
||||
if (this.localWebhook.enabled && isURL(this.localWebhook.url, { require_tld: false })) {
|
||||
const httpService = axios.create({ baseURL });
|
||||
const postData = {
|
||||
event,
|
||||
|
Loading…
Reference in New Issue
Block a user