Ask Laravel return the Status_code value question

Source: Internet
Author: User
Because some operators, routers, browsers and so on;
Requests that are not 200 status are intercepted, and then changed to their ad or custom page;

So the question comes; ask the parents;
Where is laravel, and can control the value of all returned Status_code?
The effect I want to achieve is; all AJAX requests; the return is 200;

Humbly

--------------------------Split Line--------------------
Because also involves Dingo, JWT and so on too many problems;
Temporarily abandon the practice of unifying status_code;
When there is a good plan, fill this hole again;

Reply content:

Because some operators, routers, browsers and so on;
Requests that are not 200 status are intercepted, and then changed to their ad or custom page;

So the question comes; ask the parents;
Where is laravel, and can control the value of all returned Status_code?
The effect I want to achieve is; all AJAX requests; the return is 200;

Humbly

--------------------------Split Line--------------------
Because also involves Dingo, JWT and so on too many problems;
Temporarily abandon the practice of unifying status_code;
When there is a good plan, fill this hole again;

Error thrown is a file controlled by a framework class within the Symfony/Component/Debug/Exception/FlattenException
/vendor/symfony/debug/exceptionflattenexception.php

Modify the Create method, and there may be other things you can try to modify

 if (null === $statusCode) {            $statusCode = 200;}
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.