mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-09-22 21:30:44 +02:00
Merge commit from fork
Checks the URL scope on every hop of a redirect chain instead of only on the URL requested by the frontend. Without it, a server on an allowed origin can redirect the request to any other origin - including `localhost` services, internal hosts and cloud metadata endpoints - and the plugin follows it, returning the response to the webview.
This commit is contained in:
@@ -76,6 +76,10 @@ export interface ClientOptions {
|
||||
/**
|
||||
* Defines the maximum number of redirects the client should follow.
|
||||
* If set to 0, no redirects will be followed.
|
||||
*
|
||||
* When the `scopeRedirects` plugin configuration is enabled, every redirect must
|
||||
* also be allowed by the configured scope, otherwise the request fails
|
||||
* instead of being followed.
|
||||
*/
|
||||
maxRedirections?: number
|
||||
/** Timeout in milliseconds */
|
||||
|
||||
Reference in New Issue
Block a user