You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
The key has expired.
Now requires Node 14.
Application, Context, Request and Response now have a origin property. This defaults defaults to http://localhost. This can be overridden by setting Application.origin, or setting a CURVEBALL_ORIGIN environment variable. PUBLIC_URI also works, but it's mainly a fallback for earlier examples and recommendations.
Request and Context now have a absoluteUrl property. This is calculated based on the request path and the origin.
BC Break: Due to the new origin property, all Request and Response classes now have an extra constructor argument. This means if you ever manually constructed any of these, there's a small change you'll need to make. Typescript should point all these problems!
If CURVEBALL_TRUSTPROXY is set, request.ip() will trust proxies by default, and return the ip of the real client instead of the proxy.