Skip to content

Commit 2cb719d

Browse files
committed
feat: Add check to skip localhost instances in OpenSourceDeploymentAPI
1 parent eafb543 commit 2cb719d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Common/Server/API/OpenSourceDeploymentAPI.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,14 @@ export default class OpenSourceDeploymentAPI extends BaseAPI<
3939
(body["oneuptimeVersion"] as string) || "unknown";
4040
deployment.instanceUrl = (body["instanceUrl"] as string) || "";
4141

42+
// Skip localhost instances - these are default/unconfigured deployments.
43+
if (
44+
deployment.instanceUrl === "http://localhost/" ||
45+
deployment.instanceUrl === "http://localhost"
46+
) {
47+
return Response.sendEmptySuccessResponse(req, res);
48+
}
49+
4250
await OpenSourceDeploymentService.create({
4351
data: deployment,
4452
props: {

0 commit comments

Comments
 (0)