Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QtWebEngine
  4. How to change "referer" of request header
QtWS25 Last Chance

How to change "referer" of request header

Scheduled Pinned Locked Moved Unsolved QtWebEngine
6 Posts 3 Posters 1.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y Offline
    Y Offline
    youthdou
    wrote on last edited by
    #1

    My qt version is 5.8. I set "referer" in QWebEngineUrlRequestInterceptor, but it doesn't work! The code likes this:

    void TWebEngineUrlRequestInterceptor::interceptRequest(QWebEngineUrlRequestInfo &info)
    {
        info.setHttpHeader("Referer", "xxxxxxxx");
    }
    
    raven-worxR 1 Reply Last reply
    0
    • Y youthdou

      My qt version is 5.8. I set "referer" in QWebEngineUrlRequestInterceptor, but it doesn't work! The code likes this:

      void TWebEngineUrlRequestInterceptor::interceptRequest(QWebEngineUrlRequestInfo &info)
      {
          info.setHttpHeader("Referer", "xxxxxxxx");
      }
      
      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @youthdou said in How to change "referer" of request header:

      but it doesn't work

      enlighten us please.

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      1
      • Y Offline
        Y Offline
        youthdou
        wrote on last edited by
        #3

        @raven-worx said in How to change "referer" of request header:

        enlighten

        QWebEngineUrlRequestInterceptor does not allow to pass the Referer header

        raven-worxR JonBJ 2 Replies Last reply
        0
        • Y youthdou

          @raven-worx said in How to change "referer" of request header:

          enlighten

          QWebEngineUrlRequestInterceptor does not allow to pass the Referer header

          raven-worxR Offline
          raven-worxR Offline
          raven-worx
          Moderators
          wrote on last edited by
          #4

          @youthdou
          yes, very enlightening...
          So we can continue guessing what you want us to say by posting the link without any further words.

          --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
          If you have a question please use the forum so others can benefit from the solution in the future

          Y 1 Reply Last reply
          0
          • Y youthdou

            @raven-worx said in How to change "referer" of request header:

            enlighten

            QWebEngineUrlRequestInterceptor does not allow to pass the Referer header

            JonBJ Offline
            JonBJ Offline
            JonB
            wrote on last edited by
            #5

            @youthdou
            I'm not a Qt representative so I don't know what you do about it, but that link states it's an open/unresolved bug which prevents the Referer Header being altered from Qt. Unless you are compiling Qt yourself and can follow the Old/New Code there to make the change to allow it, I think....

            1 Reply Last reply
            1
            • raven-worxR raven-worx

              @youthdou
              yes, very enlightening...
              So we can continue guessing what you want us to say by posting the link without any further words.

              Y Offline
              Y Offline
              youthdou
              wrote on last edited by
              #6

              @raven-worx
              I have sovled it by compiling Qt. But I think there should be some tips in QT documents to describe it.

              1 Reply Last reply
              1

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved