Closed dreamdevil00 closed 6 years ago
Finally, I found the problem. This problem occoured when the the search value is Chinese.
Failed to execute 'setRequestHeader' on 'XMLHttpRequest': '{"where":{"and":[{"or":[{"pname":"2010年四项目"}]}]},"limit":20,"offset":0,"order":""}' is not a valid HTTP header field value."
I found the default behavior of filter is filter on headers in lb.config.ts When I changed
private static filterOn: string = 'headers';
to
private static filterOn: string = 'url';
the problem gone.
I found that it does not check the value before setting headers, the source code, this leads to the problem.
@dreamdevil00 you should not directly modify the lb.config file, you should instead call the method LoopBackConfig.filterOnUrl() to avoid the headers issue.
Cheers Jon
Thanks a lot. @jonathan-casarrubias
What type of issue are you creating?
What version of this module are you using?
Write other if any:
Please add a description for your issue:
I have to get infomation count with where filter, and the filter is
it turns out one url
which does not work at all
Instead, I think the url should be like this
Please confirm