Why are cookies unrecognized when a link is clicked from an external source (i.e. Excel, Word, etc…)

后端 未结 17 2539
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-28 04:39

I noticed that when a link is clicked externally from the web browser, such as from Excel or Word, that my session cookie is initially unrecognized, even if the link opens u

17条回答
  •  时光取名叫无心
    2020-11-28 04:56

    NGINX solution below:

    if ($http_user_agent ~* Word|Excel|PowerPoint|ms-office) {
        return 200 '';
    }
    

    You can put it in the server or location block. Works like charm.

提交回复
热议问题