Skip to content

Commit

Permalink
Update server.R
Browse files Browse the repository at this point in the history
  • Loading branch information
pingfan-hu committed Nov 26, 2024
1 parent 86d509e commit f67268a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions R/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -1398,8 +1398,14 @@ handle_sessions <- function(db, session, input, time_start, start_page, current_
session_registry$current_id <- session$token
}

# Check use_cookies flag
if (!use_cookies) {
# Check if we should proceed with cookie logic
should_use_cookies <- use_cookies && (
!is.null(db) || # Has database connection
file.exists("preview_data.csv") # Has preview data file
)

# Return early if we shouldn't use cookies
if (!should_use_cookies) {
return(session$token)
}

Expand Down

0 comments on commit f67268a

Please sign in to comment.