Skip to content

Commit b1ecbe4

Browse files
committed
update sandbox_api
1 parent 8f3f455 commit b1ecbe4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

examples/sandbox_api/src/main.nim

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ serve host, port:
5757
"error_code": 1,
5858
"error": "code length too long (> 2048)"
5959
}
60-
if task.code.contains(re2"((macro) +\w+|static *: *\n +)"):
60+
if task.code.contains(
61+
re2"(macro +\w+|static *: *\n +|\bstaticExec\b|\bgorge\b|\bgorgeEx\b|\bstaticEx\b)"
62+
):
6163
statusCode = 400
6264
return %*{
6365
"response": "error",
@@ -71,7 +73,7 @@ serve host, port:
7173
task: task,
7274
process: startProcess(
7375
"nim", getCurrentDir(), @[
74-
"js", "-d:danger", "--opt:size", "--out:" & ("tasks" / (task.id & ".js")),
76+
"js", "-d:release", "--opt:size", "--out:" & ("tasks" / (task.id & ".js")),
7577
"tasks" / (task.id & ".nim")
7678
], options = {poStdErrToStdOut, poUsePath}
7779
)

0 commit comments

Comments
 (0)