Commit 44865349 authored by Tobias Steiner's avatar Tobias Steiner
Browse files

Update api. Search in full query string

parent 73ca40ae
Pipeline #2306 passed with stage
in 2 minutes and 27 seconds
......@@ -59,11 +59,12 @@ export class ApiController {
* @param next
*/
public static checkEncoding(req: InterfaceRequestKafka, res: Response, next: NextFunction) {
const url = req.originalUrl || req.url;
const rules = {
// check for question marks
questionmark: (req.params.node.match(/\?/g) || []).length,
questionmark: (url.match(/\?/g) || []).length,
// check for hashtags
hashtag: (req.params.node.match(/#/g) || []).length
hashtag: (url.match(/#/g) || []).length
};
// enforce the rules
for(let rule in rules) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment