mirror of
https://github.com/discourse/discourse.git
synced 2025-04-29 16:34:39 +08:00
Add post parameters so plugins like akismet can use it for spam
prevention.
This commit is contained in:
parent
1f40807001
commit
f028b51620
@ -420,6 +420,11 @@ class PostsController < ApplicationController
|
|||||||
result[f] = params[f] if params.has_key?(f)
|
result[f] = params[f] if params.has_key?(f)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Stuff we can use in spam prevention plugins
|
||||||
|
result[:ip_address] = request.remote_ip
|
||||||
|
result[:user_agent] = request.user_agent
|
||||||
|
result[:referrer] = request.env["HTTP_REFERER"]
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user