Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
histhub
api
Commits
44865349
Commit
44865349
authored
Feb 21, 2019
by
Tobias Steiner
Browse files
Update api. Search in full query string
parent
73ca40ae
Pipeline
#2306
passed with stage
in 2 minutes and 27 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/controller/api.ts
View file @
44865349
...
...
@@ -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
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment