CodeIgniter Forums
302 header response from webhook - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: 302 header response from webhook (/showthread.php?tid=79773)



302 header response from webhook - VypSudd - 07-26-2021

Hi. I am trying to work with webhooks from Stripe but cannot get past the issue of it returning 302 Found as the header response.
Stripe is sending a POST with json data. I have tried both locally and on live and it comes up with the same response.
Severity: Notice
Message: Undefined index: HTTP_REFERER
Filename: html/error_general.php
Line Number: 4

If I remove the:  require_once BASEPATH.'core/CodeIgniter.php'; 
in index.php, I can get a 200 response, but it still never hits my controller.

This is my controller: (webhook_controller.php)
defined('BASEPATH') OR exit('No direct script access allowed');
class Webhook_controller extends Home_Core_Controller
{
    public function webhook()
    {
        }
}

This is my route: 
$route['webhook']['post'] = 'webhook_controller/webhook';

I have excluded my webhook_controller from csrf
$config['csrf_exclude_uris'] = array('ajax_admin_controller.*', 'ajax_controller.*', 'webhook_controller.*' );

Any tips?
Thanks.

Leaning close he whispers ‘How many cocks would you like to try?’ June gasps at his suggestion and feels herself tremble as he stands looking at her. ‘I’ve never had more than one’ she admits. Walking from the room he looks back, ‘stay there’ is all he says. Minutes later Jake walks in still naked and sits on the bed stroking her body without saying a word. A short time later they hear a knock at the suite’s door and Jake leaves to answer it. Laying still June hears voices in the next room, then Jake enters ‘are you ready June?’ he asks all she can do is nod nervously. Pushing the door open he exposes her naked body to the 2 other men in the living room, both of them in the stages of stripping, stop and look at her appreciatively and June cannot help but open her legs wider. free sex chat

Quickly the men strip and June watches as they come close, already their cocks are stiffening as they gaze at her lying naked and ready on the bed. Jake starts to say ‘This is…’ but she interrupts him ‘I don’t want to know their names, I just want them to fuck me!’ her hands start to play with her breasts and nipples as they move beside her on the bed. One of the men pushes his cock towards her mouth and she greedily takes it all the way in, not as big as Jake’s she sucks hard on it making the man groan. live sex cams

The other man almost dives between her already open legs and starts licking and sucking her pussy, June moans loudly round the cock in her mouth and bucks her hips as the man finds her clit and bites it hard. Looking at Jake as he stands beside the man fucking her mouth she sees him stroking his cock back to hardness, he grins at her ‘You’re a real slut aren’t you June’ he tells her and not stopping sucking all she can do is nod making the man gasp as his cock moves in her mouth. Feeling his cock twitch June pulls away, I want you fucking me when you come she demands, pushing the man from between her legs she stands up. Telling the 1st man to lay on the bed, as he lays back June straddles him, guiding his rock hard cock to her already dripping pussy and pushes down on it. Both of them moan loudly, Jake makes her take his cock in her mouth as she rides the cock buried deep inside her moaning continuously now. The 3rd man demands ‘what about me?’ before June can say anything Jake grabs her arms hauling her forward…. ‘There’s a 3rd hole free’ he laughs. live sex chat