Fixed #19. Used configuration option for public url instead of using url_for function.