GithubHelp home page GithubHelp logo

Comments (19)

DJaeger avatar DJaeger commented on July 16, 2024

For me it is working like expected.
The CORS of MapQuest tiles is "Access-Control-Allow-Origin: *" so it is allowed to load the tiles from every origin.
Do you use a local address?

from maps.

jancborchardt avatar jancborchardt commented on July 16, 2024

Yeah, I use localhost. Anything I need to adjust then?

from maps.

DJaeger avatar DJaeger commented on July 16, 2024

CORS is not working on localhost.
You have to use a public accessible address.

from maps.

Henni avatar Henni commented on July 16, 2024

@DJaeger is there any way to make it work locally as it's quite an effort to develop on a remote machine instead of developing locally? Especially because owncloud makes it so easy to setup a local development environment with ocdev.

from maps.

v1r0x avatar v1r0x commented on July 16, 2024

I have the same problem, but instead of localhost I use a public domain.

I get these errors (in german):

Content Security Policy: Die Einstellungen der Seite haben das Laden einer Ressource auf self blockiert ("script-src https://my.url 'unsafe-eval'").
onsubmit attribute on DIV element

Content Security Policy: Die Einstellungen der Seite haben das Laden einer Ressource auf http://otile3.mqcdn.com/tiles/1.0.0/osm/15/17210/11312.png blockiert ("img-src https://my.url").

from maps.

DJaeger avatar DJaeger commented on July 16, 2024

Which version of owncloud and maps and which browser in which version do you both use?

from maps.

Henni avatar Henni commented on July 16, 2024

Works for me now. It was broken for me a while back on previous versions of core and maps.
(BTW I'm now using the master of core and maps and the current Chrome beta)

from maps.

DJaeger avatar DJaeger commented on July 16, 2024

That's great, as the current version should work.

from maps.

Henni avatar Henni commented on July 16, 2024

I just switched between branches on core and now it broke again. Even switching back to the previous branch doesn't help.

Now the icons are missing and the map tiles don't load:
image

edit: maybe this has something to do with http/https.

from maps.

v1r0x avatar v1r0x commented on July 16, 2024

Which version of owncloud and maps and which browser in which version do you both use?

I'm using 8.1.0 (stable), the current maps master and latest firefox beta 40 (and for testing chromium v37)

from maps.

DJaeger avatar DJaeger commented on July 16, 2024

Mhm, this seems to be introduced with one of the last updates of core.
I'm on 8.0.4 and it works without issues.

from maps.

LukasReschke avatar LukasReschke commented on July 16, 2024

Read https://statuscode.ch/2015/04/content-security-policy-and-ownCloud/ and take a look at owncloud/core#13989, you need to add a img-src policy allowing each of these domains or even *.

from maps.

DJaeger avatar DJaeger commented on July 16, 2024

Ok, that was new to me as I'm not on 8.1.
Great article.
But this would make the app not compatible with core <8.1
So maintain a lagacy version or simply work towards a >=8.1 version?

from maps.

brantje avatar brantje commented on July 16, 2024

@DJaeger A stable7 and a stable8 would be the best imo.

from maps.

jancborchardt avatar jancborchardt commented on July 16, 2024

@DJaeger @brantje If it would be a more established app, I would say we need to support stable7 and stable8.

But seeing how the app is not even published on apps.owncloud.com yet I assume it doesn’t have a lot of users. I would say it’s fine if we say we just support 8.1 and later. Then we can focus on development and don’t need to maintain a bunch of old stuff.

from maps.

LukasReschke avatar LukasReschke commented on July 16, 2024

But this would make the app not compatible with core <8.1

Not necessarily.

if (class_exists('OCP\AppFramework\Http\ContentSecurityPolicy')) {
    …
}

from maps.

Henni avatar Henni commented on July 16, 2024

@LukasReschke Is it possible in php to encapsulate a use inside of an if?

if (class_exists('OCP\AppFramework\Http\ContentSecurityPolicy')) {
   use \OCP\AppFramework\Http\ContentSecurityPolicy; 
}

from maps.

LukasReschke avatar LukasReschke commented on July 16, 2024

No. You need to use the full namespace in this case then instead of a use statement.

from maps.

DJaeger avatar DJaeger commented on July 16, 2024

I agree with @jancborchardt to simply move forward to a "release" version, which will than compatible with current versions at the time of release.
With the propose of @LukasReschke, is still only oc8 supported and no oc7, or am I wrong?

from maps.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.