Skip to content

ignoreUrl did not work for GET request with param ?? #8

@sacsand

Description

@sacsand

Example request

localhost:8088/jobapply?query={"page":1,"limit":10}
->error 404 notfound

console log the "req.originalUrl"
result => " /jobapply?query=%7B%22page%22:1,%22limit%22:10%7D "
for post,put request it console as =>
"jobapply"

so the ignoredUrls.includes(req.originalUrl) cant recognize get request with param since it passing with the param.

i did apply temp fix for now..this wont work if url include '?'

in index.js

   // split the url
  const urlFiltered = req.originalUrl.split("?");`

   // pass filtered url
    if (ignoredUrls && ignoredUrls.includes(urlFiltered[0])) {
      next(); // If the url is in `ignoredUrls`, skip the autherization.
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions