Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change_headers_on_each_request and batch requests #403

Closed
AdamQuadmon opened this issue Oct 11, 2015 · 2 comments
Closed

change_headers_on_each_request and batch requests #403

AdamQuadmon opened this issue Oct 11, 2015 · 2 comments

Comments

@AdamQuadmon
Copy link

If this flag is left true as default it's not possible to do parallel requests

to understand what I mean thake into account ng-token-auth and an ui-route resolver:

admin:
    url: '/'
    abstract: yes
    resolve:
      auth: ['$auth', '$state', ($auth, $state) ->
        $auth.validateUser()
        .catch (reason) ->
          $state.go 'sign_in', {}
          no
      ],
'admin.work':
    url: ''
    resolve:
      res1: ['Res1', 'auth', (Res1, auth) ->  Res1.get() ]
      res2: ['Res2', 'res1', (Res2, res1) ->  Res2.get() ]
'admin.work_only_not_changing_headers_on_each_request':
    url: ''
    resolve:
      res1: ['Res1', 'auth', (Res1, auth) ->  Res1.get() ]
      res2: ['Res2', 'auth', (Res2, auth) ->  Res2.get() ]

what can cause this?
I'm using the default configuration mounting the routes like that:

mount_devise_token_auth_for 'User', at: 'api/auth'
@lynndylanhurley
Copy link
Owner

Try increasing the value of batch_request_buffer_throttle to something like 1.minute and see if that fixes the issue.

@booleanbetrayal
Copy link
Collaborator

@AdamQuadmon - Definitely a tricky issue. we have a more detailed discussion of this issue here #51. Going to close this particular thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants