Skip to content

How to customize the 404 page for all requests #1642

Answered by an-tao
MJokar67 asked this question in Q&A
Discussion options

You must be logged in to vote
    /// Set custom 404 page
    /**
     * @param resp is the object set to 404 response
     * After calling this method, the resp object is returned
     * by the HttpResponse::newNotFoundResponse() method.
     * @param set404 if true, the status code of the resp will
     * be set to 404 automatically
     */
    virtual HttpAppFramework &setCustom404Page(const HttpResponsePtr &resp,
                                               bool set404 = true) = 0;

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@MJokar67
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by MJokar67
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants