Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions apps/sim/executor/execution/block-executor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ export class BlockExecutor {

try {
resolvedInputs = this.resolver.resolveInputs(ctx, node.id, block.config.params, block)
if (blockLog) {
blockLog.input = resolvedInputs
}
} catch (error) {
cleanupSelfReference?.()
return this.handleBlockError(
Expand Down
6 changes: 4 additions & 2 deletions apps/sim/lib/environment.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Environment utility functions for consistent environment detection across the application
*/
import { env, isTruthy } from './env'
import { env, getEnv, isTruthy } from './env'

/**
* Is the application running in production mode
Expand All @@ -21,7 +21,9 @@ export const isTest = env.NODE_ENV === 'test'
/**
* Is this the hosted version of the application
*/
export const isHosted = true
export const isHosted =
getEnv('NEXT_PUBLIC_APP_URL') === 'https://www.sim.ai' ||
getEnv('NEXT_PUBLIC_APP_URL') === 'https://www.staging.sim.ai'
Comment on lines +24 to +26
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: isHosted will be false if NEXT_PUBLIC_APP_URL is undefined or set to any other value. Before this change, isHosted was always true. This semantic change may break self-hosted instances that depend on hosted-only features (like API key rotation in providers/utils.ts:629 or redirect logic in middleware.ts:30).

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/sim/lib/environment.ts
Line: 24:26

Comment:
**logic:** `isHosted` will be `false` if `NEXT_PUBLIC_APP_URL` is undefined or set to any other value. Before this change, `isHosted` was always `true`. This semantic change may break self-hosted instances that depend on hosted-only features (like API key rotation in `providers/utils.ts:629` or redirect logic in `middleware.ts:30`).

How can I resolve this? If you propose a fix, please make it concise.


/**
* Is billing enforcement enabled
Expand Down