mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
feat: Enhance deployment logic for multiple Git providers
- Added support for handling commit normalization across GitHub, GitLab, and Gitea in the deployment API. - Implemented a new utility function to determine the provider based on request headers. - Improved deployment path validation to ensure consistency across different source types. - Cleaned up the code by removing redundant checks and enhancing readability.
This commit is contained in:
@@ -32,26 +32,26 @@ const { handler, api } = betterAuth({
|
||||
clientSecret: process.env.GOOGLE_CLIENT_SECRET as string,
|
||||
},
|
||||
},
|
||||
...(!IS_CLOUD && {
|
||||
async trustedOrigins() {
|
||||
const admin = await db.query.member.findFirst({
|
||||
where: eq(schema.member.role, "owner"),
|
||||
with: {
|
||||
user: true,
|
||||
},
|
||||
});
|
||||
// ...(!IS_CLOUD && {
|
||||
// async trustedOrigins() {
|
||||
// const admin = await db.query.member.findFirst({
|
||||
// where: eq(schema.member.role, "owner"),
|
||||
// with: {
|
||||
// user: true,
|
||||
// },
|
||||
// });
|
||||
|
||||
if (admin) {
|
||||
return [
|
||||
...(admin.user.serverIp
|
||||
? [`http://${admin.user.serverIp}:3000`]
|
||||
: []),
|
||||
...(admin.user.host ? [`https://${admin.user.host}`] : []),
|
||||
];
|
||||
}
|
||||
return [];
|
||||
},
|
||||
}),
|
||||
// if (admin) {
|
||||
// return [
|
||||
// ...(admin.user.serverIp
|
||||
// ? [`http://${admin.user.serverIp}:3000`]
|
||||
// : []),
|
||||
// ...(admin.user.host ? [`https://${admin.user.host}`] : []),
|
||||
// ];
|
||||
// }
|
||||
// return [];
|
||||
// },
|
||||
// }),
|
||||
emailVerification: {
|
||||
sendOnSignUp: true,
|
||||
autoSignInAfterVerification: true,
|
||||
|
||||
Reference in New Issue
Block a user