<p>My Apache server is running mod_tile and serving up tiles just fine. However, tiles served are not being sent with a response header I have added to the Apache configuration. For testing purposes I have uploaded a static .png file directly to the server to test that it does include the response header for content served up outside of mod_tile.</p>
<p>The response header I have added to my Apache configuration is:<br>
Access-Control-Allow-Origin:*</p>
<p>Here is an example of my Apache server serving a static .png file with the appropriate response header<br>
curl -i <a href="http://MyHost/11.png" rel="nofollow">http://MyHost/11.png</a></p>
<p>% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current<br>
Dload  Upload   Total   Spent    Left  Speed<br>
0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0HTTP/1.1 200 OK<br>
Date: Thu, 13 Sep 2018 21:20:06 GMT<br>
Server: Apache/2.4.6 (CentOS)<br>
Foo: Bar<br>
Last-Modified: Thu, 13 Sep 2018 20:22:20 GMT<br>
ETag: "13cd-575c676c36b15"<br>
Accept-Ranges: bytes<br>
Content-Length: 5069<br>
Access-Control-Allow-Origin: *<br>
Content-Type: image/png</p>
<p>Here is an example of the same apache server serving a tile rendered through mod_tile/renderd:<br>
curl -i <a href="http://34.198.108.116/osm_tiles/5/11/11.png" rel="nofollow">http://34.198.108.116/osm_tiles/5/11/11.png</a><br>
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current<br>
Dload  Upload   Total   Spent    Left  Speed<br>
0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0HTTP/1.1 200 OK<br>
Date: Thu, 13 Sep 2018 21:20:12 GMT<br>
Server: Apache/2.4.6 (CentOS)<br>
ETag: "cbf71740047f08923f5eed4a83dee897"<br>
Content-Length: 5069<br>
Cache-Control: max-age=604800<br>
Expires: Thu, 20 Sep 2018 21:20:12 GMT<br>
Content-Type: image/png</p>
<p>Why is renderd/mod_tile preventing apache from attaching that response header? I have attached my renderd.conf file below to help debug</p>
<p>Here is my renderd.conf file:<br>
[renderd]<br>
;socketname=/var/run/renderd/renderd.sock<br>
num_threads=4<br>
tile_dir=/var/lib/mod_tile<br>
stats_file=/var/run/renderd/renderd.stats</p>
<p>[mapnik]<br>
plugins_dir=/usr/local/lib/mapnik/input<br>
font_dir=/usr/local/share/fonts/truetype<br>
font_dir_recurse=1</p>
<p>[default]<br>
URI=/osm_tiles/<br>
TILEDIR=/var/lib/mod_tile<br>
XML=/usr/local/src/mapnik-style/osm.xml<br>
HOST=tiledev2.rostermonster.com<br>
TILESIZE=256<br>
CORS=*</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/mod_tile/issues/189">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AD2-7ocpAc0e2aNVxxXktTb7ilghjABOks5uatMDgaJpZM4WoRCh">mute the thread</a>.<img src="https://github.com/notifications/beacon/AD2-7mFkV0uhRmGieZOazqxREHSA6RY8ks5uatMDgaJpZM4WoRCh.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/openstreetmap/mod_tile","title":"openstreetmap/mod_tile","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/openstreetmap/mod_tile"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"mod_tile apache server not adding header (#189)"}],"action":{"name":"View Issue","url":"https://github.com/openstreetmap/mod_tile/issues/189"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/mod_tile/issues/189",
"url": "https://github.com/openstreetmap/mod_tile/issues/189",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
},
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"hideOriginalBody": "false",
"originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB",
"title": "mod_tile apache server not adding header (#189)",
"sections": [
{
"text": "",
"activityTitle": "**malexgit**",
"activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png",
"activitySubtitle": "@malexgit",
"facts": [
{
"name": "Repository: ",
"value": "openstreetmap/mod_tile"
},
{
"name": "Issue #: ",
"value": 189
}
]
}
],
"potentialAction": [
{
"name": "Add a comment",
"@type": "ActionCard",
"inputs": [
{
"isMultiLine": true,
"@type": "TextInput",
"id": "IssueComment",
"isRequired": false
}
],
"actions": [
{
"name": "Comment",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"openstreetmap/mod_tile\",\n\"issueId\": 189,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}"
}
]
},
{
"name": "Close issue",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueClose\",\n\"repositoryFullName\": \"openstreetmap/mod_tile\",\n\"issueId\": 189\n}"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/openstreetmap/mod_tile/issues/189"
}
],
"@type": "OpenUri",
"name": "View on GitHub"
},
{
"name": "Unsubscribe",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 379654305\n}"
}
],
"themeColor": "26292E"
}
]</script>