Skip to content

Conversation

@binnn6
Copy link

@binnn6 binnn6 commented Nov 17, 2025

  1. Duplicate Log Entries: Each request is logged twice
    • gin.Default() already includes the Logger middleware
    • In Debug mode, gin.Logger() was added again, causing duplicate logs

Reproduction

app:
  port: 8194
  debug: True
  key: dify-sandbox
max_workers: 4
max_requests: 50
worker_timeout: 5
python_path: /usr/local/bin/python3
enable_network: True # please make sure there is no network risk in your environment
enable_preload: False # please keep it as False for security purposes
allowed_syscalls: # please leave it empty if you have no idea how seccomp works
proxy:
  socks5: ''
  http: ''
  https: ''
curl -s -X POST http://localhost:8194/v1/sandbox/run \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: dify-sandbox" \
  -d '{
    "language": "python3",
    "code": "print(\"Hello from Dify Sandbox!\")\nprint(1 + 1)",
    "enable_network": false
  }'

[GIN] 2025/11/17 - 03:42:24 | 200 | 110.582µs | 172.17.0.1 | POST "/v1/sandbox/run"
[GIN] 2025/11/17 - 03:42:24 | 200 | 133.045µs | 172.17.0.1 | POST "/v1/sandbox/run"

Signed-off-by: binnnliu <[email protected]>
Signed-off-by: binnnliu <[email protected]>
@binnn6
Copy link
Author

binnn6 commented Nov 17, 2025

@Yeuoly Could you please review this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant