Angular UI-Router with DOT

I am trying to authenticate users with google api, but the returned data in the parameters contains the DOT in the token which crashes the server, it basically asks for another page that is not there, if I remove the DOT it works fine.

Here is an example url

http://localhost:9000/developer/auth/google?code=4/ubXcE1qq84XFtsAwT00_BWkLKR9RldGk6zhBS8ZSiTw.El_qMeir0J0coiIBeO6P2m_ee_B7kwI

      

And here is the state handler

  .state('/developer/auth/google', {
    url: '/developer/auth/google?code',
    templateUrl: 'views/developer/auth/google.html',
    controller: 'DeveloperAuthGoogleCtrl',
    resolve: {
    code: function($stateParams) {
        return $stateParams.code;
      }
    }
  })

      

thank

+3


source to share


1 answer


I had the same problem.

I fixed this by changing the rewrite rule to the node server. Now I can use DOT for any parameter



Check out this rewrite rule:

modRewrite(['!\\.html|\\.js|\\.svg|\\.css|\\.png$ /index.html [L]'])

      

+1


source







All Articles