Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Wazuh API] Fix the requests GET // #3661

Merged
merged 6 commits into from Nov 30, 2021

Conversation

yenienserrano
Copy link
Member

@yenienserrano yenienserrano commented Oct 22, 2021

Description

Replace all the requests to GET // by the valid endpoint to avoid redirection and a useless request.

Issues Resolved

[Wazuh API] [Optimization] Fix the requests GET //#3634

Test

see the logs of the wazuh api and in the UI go to the agents table and see that the redirect "//" is no longer done, it only does the "/"

Check List

  • Replace all the requests to GET // by the valid endpoint to avoid redirection and a useless request.

image

@yenienserrano yenienserrano changed the base branch from master to 4.3-7.10 October 22, 2021 10:15
@yenienserrano yenienserrano self-assigned this Oct 22, 2021
@yenienserrano yenienserrano added the type/bug Bug issue label Oct 22, 2021
@yenienserrano yenienserrano linked an issue Oct 22, 2021 that may be closed by this pull request
@CPAlejandro
Copy link
Contributor

Remember to add the Changelog.md

Copy link
Contributor

@CPAlejandro CPAlejandro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CR and Testing: LGTM!
image

  - Replaced the check for the endpoint path to accept the root Wazuh API endpoint `/`
  - Removed the space in the requests for the root Wazuh API endpoint
@Desvelao
Copy link
Member

Desvelao commented Nov 2, 2021

Changes

  • Removed the space in the root Wazuh API endpoint (related to GET / requests in the previous commits of this PR)
  • Fixed the requirement for the path endpoint that should start with /. Now uses .startsWith function instead of a regular expression that required something more than / in the path

API logs (/var/ossec/logs/api.log)

2021/11/02 09:55:09 INFO: wazuh-wui 172.17.1.1 "GET /" with parameters {} and body {} done in 0.033s: 200

@Desvelao Desvelao changed the title Fix the requests get [Wazuh API] Fix the requests GET // Nov 2, 2021
@github-actions
Copy link
Contributor

Jest Test Coverage % values
Statements 3.98% ( 1443 / 36286 )
Branches 1.6% ( 453 / 28324 )
Functions 2.92% ( 259 / 8881 )
Lines 4.03% ( 1398 / 34674 )

Copy link
Contributor

@gabiwassan gabiwassan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Machi3mfl Machi3mfl added the 4.3 label Nov 30, 2021
@MauGaP MauGaP changed the base branch from 4.3-7.10 to 4.3-7.10---RC1 November 30, 2021 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Bug issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Wazuh API] [Optimization] Fix the requests GET //
6 participants