Closed collimarco closed 8 years ago
Ok, I've found out that the GET request is for the challenge (as described here: https://blog.superfeedr.com/pubsubhubbub/api/getting-started-with-pubsubhubbub/).
Currently I have made a patch by adding a custom method in routes:
get "#{SuperfeedrEngine::Engine.base_path}:feed_id" => 'feeds#superfeedr_challenge'
However I think that the Rails Engine MUST manage that request by itself.
I'm making a mess. sync: true
is to validate the "intent" to subscribe, it doesn't validate the feed.
In my controller:
body, ok = SuperfeedrEngine::Engine.subscribe(@feed, {retrieve: true, sync: true})
I need
sync: true
because is the only way I have found to validate the url/feed inserted by the user.This triggers a sync request from Superfeedr to my service, however that request always fails. From my logs:
Indeed routes in your Engine are defined as follows:
As you can see the Engine expects a POST while your servers are actually triggering a GET request.
Can you fix this?