mirror of
https://github.com/ershisan99/coolify.git
synced 2025-12-31 05:09:24 +00:00
fix: Added support for HTTP source URLs in Git source. Currently only support HTTPS
This commit is contained in:
@@ -72,17 +72,19 @@ async function send({
|
||||
...headers
|
||||
};
|
||||
}
|
||||
if (token && !path.startsWith('https://')) {
|
||||
|
||||
if (token && !path.startsWith('https://') && !path.startsWith('http://')) {
|
||||
opts.headers = {
|
||||
...opts.headers,
|
||||
Authorization: `Bearer ${token}`
|
||||
};
|
||||
}
|
||||
if (!path.startsWith('https://')) {
|
||||
|
||||
if (!path.startsWith('https://') && !path.startsWith('http://')) {
|
||||
path = `/api/v1${path}`;
|
||||
}
|
||||
|
||||
if (dev && !path.startsWith('https://')) {
|
||||
if (dev && !path.startsWith('https://') && !path.startsWith('http://')) {
|
||||
path = `${getAPIUrl()}${path}`;
|
||||
}
|
||||
if (method === 'POST' && data && !opts.body) {
|
||||
|
||||
Reference in New Issue
Block a user