Android: cookie handling for proxied requests + avoid creating a new connection to check the contentType #2836
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #2831
When using the "server.url" parameter in the capacitor.config.json to retrieve the app data from an external server incoming cookies are not saved to the CookieManager. Also an additional connection is opened in handleProxyRequest to check the contentType.
see: WebViewLocalServer:handleProxyRequest
see: JSInjector:getInjectedStream
My scenario:
Currently I use capacitor to add a native barcode scanner to my PWA app.
When running as simple PWA, the "browser camera api" is used, but when running in the capacitor app the native barcode scanner should be used.
Therefore capacitor seems to be the perfect framework.
But currently i have the described problem when the authentication cookie should be saved.
I would be happy if my change would be included in the project.
see issue:
#2831