mapfish / mapfish-print

A component of MapFish for printing templated cartographic maps. This module is the Java serverside module.
http://mapfish.github.io/mapfish-print-doc/
BSD 2-Clause "Simplified" License
184 stars 417 forks source link

add matches to http processors #347

Closed sbrunner closed 8 years ago

sbrunner commented 8 years ago

Concerned processors: ForwardHeadersProcessor AddHeadersProcessor UseHttpForHttpsProcessor in place of hosts ? (should be named MapPortProcessor ?) MapUriProcessor ? Others ?

Wanted config for GeoMapFish:

        - !configureHttpRequests
            httpProcessors:
            - !mapUri
                match:
                - !dnsMatch
                    host: ${host}
                mapping:
                    (https?)://${host}/(.*): "$1://127.0.0.1/$2"
            - !portMapping
                match:
                - !dnsMatch
                    host: ${host}
                portMapping:
                    443: 80
            - !forwardHeaders
                match:
                - !dnsMatch
                    host: ${host}
                headers:
                - Cookie
                - Host
            - !forwardHeaders
                headers:
                - Referer

see also: https://github.com/mapfish/mapfish-print/pull/321#issuecomment-144737619

Jenselme commented 8 years ago

We will need this soon. Some of our geoportal are protected by HTTP basic auth. So we forward the Authorization header to the server so MFP can read the tiles. But currently the authorization header is also forwarded to the external WMS that are imported. Of course, that is not the wanted behavior.

pvalsecc commented 8 years ago

I'm working on it. ETA: by the end of the week.

Jenselme commented 8 years ago

@pvalsecc Good news!

pvalsecc commented 8 years ago

To be consistent with !restrictUris, the map will be called matchers, not match

sbrunner commented 8 years ago

looks good :-)