lib/miteru/notifiers/urlscan.rb in miteru-2.1.0 vs lib/miteru/notifiers/urlscan.rb in miteru-2.1.1
- old
+ new
@@ -7,11 +7,11 @@
# @param [Miteru::Website] website
#
def call(website)
return unless callable?
- website.kits.each { |kit| submit(kit.url) }
+ website.kits.each { |kit| submit(kit.url, source: website.source) }
end
def callable?
!Miteru.config.urlscan_api_key.nil?
end
@@ -39,11 +39,15 @@
def visibility
Miteru.config.urlscan_submit_visibility
end
- def submit(url)
- http.post("https://urlscan.io/api/v1/scan/", json: {tags:, visibility:, url:})
+ #
+ # @param [String] url
+ # @param [String] source
+ #
+ def submit(url, source:)
+ http.post("https://urlscan.io/api/v1/scan/", json: {tags: tags + ["source:#{source}"], visibility:, url:})
end
end
end
end