Conversation
f7ded59 to
2985cd8
Compare
2985cd8 to
f593922
Compare
f593922 to
39eea04
Compare
| return makeResponse(null, blob, {}, mimeType) | ||
| } catch (error) { | ||
| log.error('map: load blob:', error) | ||
| return makeResponse(null, '', { status: 404 }) |
There was a problem hiding this comment.
nitpick/correctness: we don't know exact error code, could be temporary error, not sure if leaflet uses it / if it makes a difference in this case.
I believe we should make a new core method that also returns the error code, so that we can return the correct error code here.
39eea04 to
582322b
Compare
|
Update: I reduced the sessions to just 2 types of sessions which also simplifies the cleanup process and added a reduced version of maps.xdc to avoid additional dependant decisions deltachat/maps#7 |
WofWca
left a comment
There was a problem hiding this comment.
OK, so the main purpose of this MR is to allow a WebXDC app that claims to be a maps app to connect to arbitrary destinations, and not just openstreetmap.org, for the purpose of loading the tiles from other services, right?
However, this implementation requires that the app is going to use the Delta Chat Desktop -specific maps:// protocol for that.
Do we want to support third-party maps WebXDC apps? If yes, then this MR will break them, and require that they explicitly support Delta Chat Desktop.
If not, then I'd suggest to have a white-list of map service domains.
Has https://www.electronjs.org/docs/latest/api/web-request API been considered? i.e. intercept https requests.
582322b to
e7b8fb0
Compare
The main idea is to have an easy way to extend the map sources (i.e. to extend the mapServices list in the version with add-ons) and yes these can be added to Saved messages and replace the intergrated maps.xdc
We could got for that if we have a clear concept of use cases for this "integrated apps have Internet access"
A more generic approach would be to ask the user once if the replaced & integrated app accesses an external URL and remember the answer |
OK, so are we willing to break existing maps apps with this? Looking at my comment above, #5455 (comment), it appears that this |
That's what "experimental" means. Breaking changes can occur. |
|
So do we then wait for the respective maps MR (deltachat/maps#7) to get merged? Or for DC Android / iOS client devs to confirm that they're OK with this? Or does it all just not matter? |
|
to sum up, what i got from one to one discussions with @nico, i think, it is fine. at a glance, imu, it offers to
|
- add new maps.xdc (for testing)
946e43e to
8eceeb9
Compare
WofWca
left a comment
There was a problem hiding this comment.
Alright, this looks to be about finished up.
Finally the rendered processes doesn't need direct internet access anymore!
The irrelevant changes also appear OK.
As long as we are OK with breaking the "maps" feature for everyone who uses it currently with no obvious way to fix it, let's merge.
#skip-changelog
It should be noted that the core request to openstreetmap.org fails.
Maybe since the core sends a UserAgent header that is blocked from openstreepap.org.
https://operations.osmfoundation.org/policies/tiles/
edit: chatmail/core#7302 would fix the problem of openstreetmap.org