remove trailing slash from API endpoint, appendum to 8da9d0b
request remote_addr only when using the comment form