I was able to figure out how to enable the mod_tile debug logging. I edited /etc/apache2/sites-available/000-default.conf and below:

CustomLog ${APACHE_LOG_DIR}/access.log combined

I added:

LogLevel debug

This allowed me to see the tile_handler_serve debug message in the mod_tile.c:tile_handler_server function. I was able to determine that I did need to add CORS=* to the [ajt] section of /usr/local/etc/renderd.conf. Doing that, got me past the first if statement in tile_handler_server and into the mod_tile.c:add_cors function.

However, at this point, it is using the apache api apr_table_get to get the value of “Origin” which is null.

I am not sure how to have it so that Origin is not null since if it is not null, it looks like various CORS headers will be added and everything will start working as expected (I hope).

Any insights into this would be appreciated.