Giter Club home page Giter Club logo

fixnginxproxywechat's Introduction

FixNginxProxyWechat

fix nginx proxy server dev wechat public number repeat request code

当进行微信开发的时候,后台通过nginx进行反向代理之后,导致微信获取openid的获取code进行两次请求, 经测试苹果手机不会,而安卓手机会 具体原因这个帖子讲解的非常详细了:https://developers.weixin.qq.com/community/develop/doc/b8f9f09573e92ffb0e23308d54bcdcf7 现在通过后端根据code请求获取openid,通过ajax调用后端接口,这样避免了两次调用, 上面帖子中提到的加一个参数,加上这个参数安卓还是不起作用 @author lucas @date 2019-8-14 10:04:02 @since 1.0

帖子

微信公众号网页授权时,回调两次?

像这种网页,我获取code时,会收到两个请求:

code虽然都是一样的,但是ip一个是成都的ip,另一个是上海的ip,有时候是天津的ip,sessionId也不一样。

我也碰到这个问题,我用nginx 做了一次代理,然后用apache 做了一次代理,都是两次请求,但是如果不做代理,就没有这个问题?非常无语?不知道老兄现在解决了吗?

我也遇到这个问题,不仅仅是网页授权回调,在微信里面点击菜单或点击聊天消息中的URL都会发出两次请求?请问如何解决?

服务器也是使用Nginx了反向代理。

fixnginxproxywechat's People

Contributors

andotorg avatar antsdot avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.