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.
current-url
Advanced tools
Get the current URL isomorphically.
Respects the following HTTP headers:
Host
Forwarded
X-Forwarded-Proto
X-Forwarded-Protocol
X-Url-Scheme
Front-End-Https
X-Forwarded-Ssl
X-Forwarded-Host
X-Forwarded-Port
X-Replaced-Path
yarn add current-url
In the browser call the function with no arguments:
import { currentUrl } from 'current-url';
currentUrl();
On the server call the function with a Node HTTP request object as the first argument:
import { currentUrl } from 'current-url';
currentUrl(req);
// Ignore proxies
currentUrl(req, { ignoreProxies: true });
In both cases the function returns a URL
object.
ignoreProxies
Type: object
Default: false
By default, the currentUrl
function will take into account potential URL
rewrites made by proxies, load balancers, etc. along the way (as long as these
append special HTTP headers to the request). Use this option to disable that
behaviour.
FAQs
Get the current URL isomorphically.
The npm package current-url receives a total of 221 weekly downloads. As such, current-url popularity was classified as not popular.
We found that current-url demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.