alibaba / alibaba/lightproxy

[bug]编写NodeJS代码时不支持``字符

Open
#286 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
3.2k
Forks
274
PR merge metrics
No merged PRs in 30d

Description

已知如下代码不生效:
```
xxx.com/a.json scriptfile://`
exports.handleRequest = async (ctx, next) => {
ctx.body = `{a: 1}`;
};
`
```

需要将ctx.body = `{a: 1}` 改成 ctx.body = '{a: 1}' 才生效。

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the provided scriptfile:// example with the NodeJS handler and compare the backtick template literal with the single-quoted body. Trace the proxy's handling of the script content; done when the backtick version executes and returns the expected body without requiring the workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
nodejs, typescript
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
40/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.