I cannot upload any pictures after using CDN



  • I set the domain name in the CDN to https://xxx.yyy This points to the address provided by the CDN to me.
    For some special reasons, my server is a dynamic IP address, so my CDN back-to-source domain name is https://cdn.yyy which points to the server where nodebb is deployed.

    Since my CDN does not support websocket, I have the following configuration in config.json
    "socket.io": {
    "origins": ":",
    "transports": ["polling"]
    },
    "url": "https://xxx.yyy",

    I have the following configuration in nginx.conf
    server_name xxx.yyy cdn.yyy;

    When I upload a profile picture, I can find the error in the chrome console

    Failed to load resource: the server responded with a status of 400 ()
    socket.io.js:7 POST https://xxx.yyy/socket.io/?EIO=3&transport=polling&t=NCtuzk2&sid=3Ud1Gzokb0tf8jODAAAC 400
    o.create @ nodebb.min.js?v=r00khbol8e4:1
    o @ nodebb.min.js?v=r00khbol8e4:1
    r.request @ nodebb.min.js?v=r00khbol8e4:1
    r.doWrite @ nodebb.min.js?v=r00khbol8e4:1
    (anonymous) @ nodebb.min.js?v=r00khbol8e4:1
    (anonymous) @ nodebb.min.js?v=r00khbol8e4:1
    r @ nodebb.min.js?v=r00khbol8e4:1
    (anonymous) @ nodebb.min.js?v=r00khbol8e4:1
    (anonymous) @ nodebb.min.js?v=r00khbol8e4:1
    t.encodePacket @ nodebb.min.js?v=r00khbol8e4:1
    o @ nodebb.min.js?v=r00khbol8e4:1
    o @ nodebb.min.js?v=r00khbol8e4:1
    c @ nodebb.min.js?v=r00khbol8e4:1
    t.encodePayload @ nodebb.min.js?v=r00khbol8e4:1
    i.write @ nodebb.min.js?v=r00khbol8e4:1
    e @ nodebb.min.js?v=r00khbol8e4:1
    i.doClose @ nodebb.min.js?v=r00khbol8e4:1
    i.close @ nodebb.min.js?v=r00khbol8e4:1
    i.onClose @ nodebb.min.js?v=r00khbol8e4:1
    i.onError @ nodebb.min.js?v=r00khbol8e4:1
    (anonymous) @ nodebb.min.js?v=r00khbol8e4:1
    i.emit @ nodebb.min.js?v=r00khbol8e4:1
    i.onError @ nodebb.min.js?v=r00khbol8e4:1
    (anonymous) @ nodebb.min.js?v=r00khbol8e4:1
    i.emit @ nodebb.min.js?v=r00khbol8e4:1
    o.onError @ nodebb.min.js?v=r00khbol8e4:1
    (anonymous) @ nodebb.min.js?v=r00khbol8e4:1
    setTimeout (async)
    hasXDR.t.onreadystatechange @ nodebb.min.js?v=r00khbol8e4:1
    0c1101c1-5d4f-4dc7-9e56-c9a2df3e005d-image.png e137037c-7780-4b2b-a774-2486c8522693-image.png

    When I upload pictures in the post, I can find the error in the chrome console

    Failed to load resource: the server responded with a status of 400 ()
    /socket.io/?EIO=3&transport=polling&t=NCtuzk2&sid=3Ud1Gzokb0tf8jODAAAC:1 Failed to load resource: the server responded with a status of 400 ()
    /socket.io/?EIO=3&transport=polling&t=NCtv4FE&sid=MZuuQLlpnXxI4yPOAAAC:1 Failed to load resource: the server responded with a status of 400 ()
    /socket.io/?EIO=3&transport=polling&t=NCtv4Jf&sid=MZuuQLlpnXxI4yPOAAAC:1 Failed to load resource: the server responded with a status of 400 ()
    /socket.io/?EIO=3&transport=polling&t=NCtvjAz&sid=Hy92qn1n-0XFzAGzAAAA:1 Failed to load resource: the server responded with a status of 400 ()
    /api/post/upload:1 Failed to load resource: the server responded with a status of 500 ()
    fa8c17ad-2d34-4583-b4ef-703ba683712e-image.png

    Please help me, thanks!



  • I set the domain name in the CDN to https://xxx.yyy This points to the address provided by the CDN to me.
    For some special reasons, my server is a dynamic IP address, so my CDN back-to-source domain name is
    https://cdn.yyy which points to the server where nodebb is deployed.

    Since my CDN does not support websocket, I have the following configuration in config.json

    "socket.io": {
        "origins": "*:*",
        "transports": ["polling"]
      },
        "url": "https://xxx.yyy",
    

    I have the following configuration in nginx.conf
    server_name xxx.yyy cdn.yyy;

    When I upload a profile picture, I can find the error in the chrome console

    Failed to load resource: the server responded with a status of 400 ()
    socket.io.js:7 POST https://xxx.yyy/socket.io/?EIO=3&transport=polling&t=NCtuzk2&sid=3Ud1Gzokb0tf8jODAAAC 400
    o.create @ nodebb.min.js?v=r00khbol8e4:1
    o @ nodebb.min.js?v=r00khbol8e4:1
    r.request @ nodebb.min.js?v=r00khbol8e4:1
    r.doWrite @ nodebb.min.js?v=r00khbol8e4:1
    (anonymous) @ nodebb.min.js?v=r00khbol8e4:1
    (anonymous) @ nodebb.min.js?v=r00khbol8e4:1
    r @ nodebb.min.js?v=r00khbol8e4:1
    (anonymous) @ nodebb.min.js?v=r00khbol8e4:1
    (anonymous) @ nodebb.min.js?v=r00khbol8e4:1
    t.encodePacket @ nodebb.min.js?v=r00khbol8e4:1
    o @ nodebb.min.js?v=r00khbol8e4:1
    o @ nodebb.min.js?v=r00khbol8e4:1
    c @ nodebb.min.js?v=r00khbol8e4:1
    t.encodePayload @ nodebb.min.js?v=r00khbol8e4:1
    i.write @ nodebb.min.js?v=r00khbol8e4:1
    e @ nodebb.min.js?v=r00khbol8e4:1
    i.doClose @ nodebb.min.js?v=r00khbol8e4:1
    i.close @ nodebb.min.js?v=r00khbol8e4:1
    i.onClose @ nodebb.min.js?v=r00khbol8e4:1
    i.onError @ nodebb.min.js?v=r00khbol8e4:1
    (anonymous) @ nodebb.min.js?v=r00khbol8e4:1
    i.emit @ nodebb.min.js?v=r00khbol8e4:1
    i.onError @ nodebb.min.js?v=r00khbol8e4:1
    (anonymous) @ nodebb.min.js?v=r00khbol8e4:1
    i.emit @ nodebb.min.js?v=r00khbol8e4:1
    o.onError @ nodebb.min.js?v=r00khbol8e4:1
    (anonymous) @ nodebb.min.js?v=r00khbol8e4:1
    setTimeout (async)
    hasXDR.t.onreadystatechange @ nodebb.min.js?v=r00khbol8e4:1
    

    0c1101c1-5d4f-4dc7-9e56-c9a2df3e005d-image.png e137037c-7780-4b2b-a774-2486c8522693-image.png

    When I upload pictures in the post, I can find the error in the chrome console

    Failed to load resource: the server responded with a status of 400 ()
    /socket.io/?EIO=3&transport=polling&t=NCtuzk2&sid=3Ud1Gzokb0tf8jODAAAC:1 Failed to load resource: the server responded with a status of 400 ()
    /socket.io/?EIO=3&transport=polling&t=NCtv4FE&sid=MZuuQLlpnXxI4yPOAAAC:1 Failed to load resource: the server responded with a status of 400 ()
    /socket.io/?EIO=3&transport=polling&t=NCtv4Jf&sid=MZuuQLlpnXxI4yPOAAAC:1 Failed to load resource: the server responded with a status of 400 ()
    /socket.io/?EIO=3&transport=polling&t=NCtvjAz&sid=Hy92qn1n-0XFzAGzAAAA:1 Failed to load resource: the server responded with a status of 400 ()
    /api/post/upload:1 Failed to load resource: the server responded with a status of 500 ()
    

    fa8c17ad-2d34-4583-b4ef-703ba683712e-image.png

    Please help me, thanks!


Log in to reply
 

Suggested Topics

| |