mapfish-print icon indicating copy to clipboard operation
mapfish-print copied to clipboard

mqcdn.com - is not one of the permitted urls

Open hoytGMX opened this issue 10 years ago • 2 comments

Hey,

my config.yaml is as follows:

templates:
  #===========================================================================
  A4 landscape: !template
  #===========================================================================
    reportTemplate: simpleReport.jrxml
    tableData: jrDataSource
    outputFilename: Foobar
    attributes:
      scalebar: !scalebar
        width: 230
        height: 35
      map: !map
        maxDpi: 400
        width: 800
        height: 500        
      datasource: !datasource
        attributes:
            title: !string {}
            table: !table {}
    processors:
    - !configureHttpRequests
      httpProcessors:
        - !restrictUris
          matchers:            
            - !dnsMatch
              host: otile1.mqcdn.com
              port: -1
            - !dnsMatch
              host: otile2.mqcdn.com
              port: -1
            - !dnsMatch
              host: otile3.mqcdn.com
              port: -1
            - !dnsMatch
              host: otile4.mqcdn.com
              port: -1
    - !reportBuilder # compile all reports in current directory
      directory: '.'
    - !createScalebar {}
    - !createMap {}
    - !createDataSource
        processors:
        - !prepareTable
          dynamic: true

Sometimes it works and sometimes not. Anyway, I get the following error message. Error while processing request: java.lang.IllegalArgumentException: http://otile1.mqcdn.com/tiles/1.0.0/map/13/4236/2715.jpg is not one of the permitted urls.

The url is one of the permited urls (otile1.mqcdn.com)?! What causes this error message?

Best regards

hoytGMX avatar Jun 19 '15 07:06 hoytGMX

Can you add a json request that I can test with?

jesseeichar avatar Jun 24 '15 07:06 jesseeichar

Here is my json request:

{"layout":"A4 landscape","outputFormat":"pdf","attributes":{"datasource":[{"title":"Wegbeschreibung","table":{"columns":["Anweisung","Distanz (km)"],"data":[["Starten Sie auf L510.","0.01"],["Geradeaus weiter auf L510.","0.7"],["Geradeaus weiter auf L510.","0"],["Sie haben Ihr Ziel erreicht.","0.69"]]}}],"map":{"projection":"EPSG:900913","dpi":100,"center":[833743.63113881,6805109.7388413],"scale":17604.555948535653,"layers":[{"geoJson":{"features":[{"geometry":{"type":"MultiLineString","coordinates":[[[832977.4755232139,6805957.382679671,102],[832989.5288962031,6805943.799159178,102],[832996.9831117622,6805935.514430922,101],[833022.2057113606,6805907.513349956,100],[833029.9296390002,6805898.96197929,100],[833093.5935779007,6805828.477262784,99],[833112.5060419494,6805807.649273457,99],[833198.6215605898,6805712.809759579,97],[833295.8791117268,6805606.082763307,96],[833386.4299987722,6805504.535891463,96],[833466.9872162077,6805414.253394057,92],[833751.6181726096,6805095.037640793,90],[833915.165142484,6804915.236304639,90],[834040.0086419331,6804778.349355872,91],[834224.6356205778,6804575.186945744,90],[834316.4712253155,6804474.264726555,91],[834396.9197640843,6804385.970051729,91],[834508.2328746547,6804263.801651838,91],[834509.7867544069,6804262.095002949,91]]]},"properties":{"print_style":"route"},"type":"Feature"}],"type":"FeatureCollection"},"style":{"styleProperty":"print_style","route":{"strokeWidth":4,"strokeOpacity":0.6,"strokeColor":"red"}},"type":"geojson"},{"type": "osm","baseURL": "http://otile1.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg"}]},"scalebar":{"align":"right"}}}

Currently everything is working fine.

hoytGMX avatar Jun 24 '15 14:06 hoytGMX