X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/73214da35de30b3466cf8d0ab751955ec9292ec4..c24b0e93997bcd6bcad475d9ba0adfe86fa01ea6:/app/controllers/api/map_controller.rb diff --git a/app/controllers/api/map_controller.rb b/app/controllers/api/map_controller.rb index 47c0aeb36..27d6f3667 100644 --- a/app/controllers/api/map_controller.rb +++ b/app/controllers/api/map_controller.rb @@ -1,8 +1,5 @@ module Api - class MapController < ApplicationController - skip_before_action :verify_authenticity_token - before_action :api_deny_access_handler - + class MapController < ApiController authorize_resource :class => false before_action :check_api_readable @@ -30,11 +27,11 @@ module Api return end - nodes = Node.bbox(bbox).where(:visible => true).includes(:node_tags).limit(MAX_NUMBER_OF_NODES + 1) + nodes = Node.bbox(bbox).where(:visible => true).includes(:node_tags).limit(Settings.max_number_of_nodes + 1) node_ids = nodes.collect(&:id) - if node_ids.length > MAX_NUMBER_OF_NODES - report_error("You requested too many nodes (limit is #{MAX_NUMBER_OF_NODES}). Either request a smaller area, or use planet.osm") + if node_ids.length > Settings.max_number_of_nodes + report_error("You requested too many nodes (limit is #{Settings.max_number_of_nodes}). Either request a smaller area, or use planet.osm") return end