This commit is contained in:
Lorenzo Pichilli 2022-10-24 14:31:16 +02:00
commit db7beffc03
7 changed files with 31 additions and 5 deletions

View File

@ -594,6 +594,15 @@
"contributions": [
"code"
]
},
{
"login": "LugonjaAleksandar",
"name": "Aleksandar Lugonja",
"avatar_url": "https://avatars.githubusercontent.com/u/41632269?v=4",
"profile": "https://www.bebilica.rs/",
"contributions": [
"code"
]
}
],
"contributorsPerLine": 7,

View File

@ -13,6 +13,8 @@
## 6.0.0-beta.8
- Merged "Exposed "shared" property of HttpServer bind method to support more use-cases." [#1395](https://github.com/pichillilorenzo/flutter_inappwebview/pull/1395) (thanks to [LugonjaAleksandar](https://github.com/LugonjaAleksandar))
- Fixed "ios 14.5 crash reports upgradeKnownHostsToHTTPS" [#1393](https://github.com/pichillilorenzo/flutter_inappwebview/issues/1393)
## 6.0.0-beta.7
@ -87,6 +89,10 @@
- Removed `URLProtectionSpace.iosIsProxy` property
- `historyUrl` and `baseUrl` of `InAppWebViewInitialData` can be `null`
## 5.7.1
- Exposed "shared" property of HttpServer bind method to support more use-cases. (thanks to [LugonjaAleksandar](https://github.com/LugonjaAleksandar))
## 5.7.0
- Added `PlatformViewsService.initExpensiveAndroidView` for Android

View File

@ -5,7 +5,7 @@
![InAppWebView-logo](https://user-images.githubusercontent.com/5956938/195422744-bdcfed16-73f0-4bc9-94ab-ecf10771a1c4.png)
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-65-orange.svg?style=flat-square)](#contributors-)
[![All Contributors](https://img.shields.io/badge/all_contributors-66-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->
[![Pub](https://img.shields.io/pub/v/flutter_inappwebview?include_prereleases)](https://pub.dartlang.org/packages/flutter_inappwebview)
@ -165,6 +165,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<tr>
<td align="center"><a href="https://github.com/perffecto"><img src="https://avatars.githubusercontent.com/u/2116618?v=4?s=100" width="100px;" alt="perffecto"/><br /><sub><b>perffecto</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=perffecto" title="Code">💻</a></td>
<td align="center"><a href="https://www.linkedin.com/in/chandra-abdul-fattah"><img src="https://avatars.githubusercontent.com/u/16184998?v=4?s=100" width="100px;" alt="Chandra Abdul Fattah"/><br /><sub><b>Chandra Abdul Fattah</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=chandrabezzo" title="Code">💻</a></td>
<td align="center"><a href="https://www.bebilica.rs/"><img src="https://avatars.githubusercontent.com/u/41632269?v=4?s=100" width="100px;" alt="Aleksandar Lugonja"/><br /><sub><b>Aleksandar Lugonja</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=LugonjaAleksandar" title="Code">💻</a></td>
</tr>
</tbody>
</table>

View File

@ -594,7 +594,7 @@ public class InAppWebView: WKWebView, UIScrollViewDelegate, WKUIDelegate,
configuration.limitsNavigationsToAppBoundDomains = settings.limitsNavigationsToAppBoundDomains
}
if #available(iOS 14.5, *) {
if #available(iOS 15.0, *) {
configuration.upgradeKnownHostsToHTTPS = settings.upgradeKnownHostsToHTTPS
}
}

View File

@ -17,6 +17,7 @@ class InAppLocalhostServer {
bool _started = false;
HttpServer? _server;
int _port = 8080;
bool _shared = false;
String _directoryIndex = 'index.html';
String _documentRoot = './';
@ -25,15 +26,24 @@ class InAppLocalhostServer {
///- [directoryIndex] represents the index file to use. The default value is `index.html`.
///
///- [documentRoot] represents the document root path to serve. The default value is `./`.
///
///- The optional argument [shared] specifies whether additional `HttpServer`
/// objects can bind to the same combination of `address`, `port` and `v6Only`.
/// If `shared` is `true` and more `HttpServer`s from this isolate or other
/// isolates are bound to the port, then the incoming connections will be
/// distributed among all the bound `HttpServer`s. Connections can be
/// distributed over multiple isolates this way.
InAppLocalhostServer({
int port = 8080,
String directoryIndex = 'index.html',
String documentRoot = './',
bool shared = false,
}) {
this._port = port;
this._directoryIndex = directoryIndex;
this._documentRoot =
(documentRoot.endsWith('/')) ? documentRoot : '$documentRoot/';
this._shared = shared;
}
///Starts the server on `http://localhost:[port]/`.
@ -57,7 +67,7 @@ class InAppLocalhostServer {
var completer = Completer();
runZonedGuarded(() {
HttpServer.bind('127.0.0.1', _port).then((server) {
HttpServer.bind('127.0.0.1', _port, shared: _shared).then((server) {
print('Server running on http://localhost:' + _port.toString());
this._server = server;

View File

@ -1183,7 +1183,7 @@ class InAppWebViewSettings_ {
///A Boolean value indicating whether HTTP requests to servers known to support HTTPS should be automatically upgraded to HTTPS requests.
///The default value is `true`.
///
///**NOTE for iOS**: available on iOS 14.5+.
///**NOTE for iOS**: available on iOS 15.0+.
///
///**NOTE for MacOS**: available on MacOS 11.3+.
///

View File

@ -1140,7 +1140,7 @@ class InAppWebViewSettings {
///A Boolean value indicating whether HTTP requests to servers known to support HTTPS should be automatically upgraded to HTTPS requests.
///The default value is `true`.
///
///**NOTE for iOS**: available on iOS 14.5+.
///**NOTE for iOS**: available on iOS 15.0+.
///
///**NOTE for MacOS**: available on MacOS 11.3+.
///