Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@hint/hint-no-http-redirects
Advanced tools
no-http-redirects
)no-http-redirects
checks if there are any HTTP redirects in the page
webhint
is analyzing.
Consider the following simplified description of what happens when a user requests a URL within a browser:
When a redirect occurs, 3.
contains the new URL the browser needs to
request, repeating the whole sequence of steps. DNS Lookup isn’t cheap,
neither is creating a TCP connection. The
impact of redirects is felt even more by mobile users, where the network
latency is usually higher.
As a rule of thumb, the more you can avoid redirects the better.
This hint checks:
webhint
has any redirect. E.g.:
http://www.example.com
--> http://example.com
http://example.com/script.js
--> https://example.com/script.js
and alerts if at least one is found.
webhint
that redirects to another oneBy default, no redirects are allowed but you can change this behavior.
The following hint configuration used in the .hintrc
file will allow 3 redirects for resources and 1 for the main URL:
{
"connector": {...},
"formatters": [...],
"hints": {
"no-http-redirects": ["error", {
"max-resource-redirects": 3,
"max-html-redirects": 1
}],
...
},
...
}
This package is installed automatically by webhint:
npm install hint --save-dev
To use it, activate it via the .hintrc
configuration file:
{
"connector": {...},
"formatters": [...],
"hints": {
"no-http-redirects": "error",
...
},
"parsers": [...],
...
}
Note: The recommended way of running webhint is as a devDependency
of
your project.
FAQs
hint for best practices related to HTTP redirects
The npm package @hint/hint-no-http-redirects receives a total of 11,452 weekly downloads. As such, @hint/hint-no-http-redirects popularity was classified as popular.
We found that @hint/hint-no-http-redirects demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.