IdentityServer External auth provider - auth-callback - Redirection - 400 Bad request

前端 未结 4 1249
孤独总比滥情好
孤独总比滥情好 2021-02-05 22:30

I am following https://www.scottbrady91.com/Angular/SPA-Authentiction-using-OpenID-Connect-Angular-CLI-and-oidc-client and https://www.scottbrady91.com/Angular/Migrating-oidc-c

4条回答
  •  清歌不尽
    2021-02-05 22:47

    As you already find out the exact problem is of header limit and solve it by limiting cookie size but limiting cookie size may not be a solution everytime.Main reason behind why angular doesn't accept large header data is bcs angular use node serve webpack-dev-server and there is limit on header size in node js you can find related issue bellow

    ng serve fails to serve pages when large cookies are present

    400 Bad request due to Node limiting header size to 8kB

    Update npm run to fix hpe_header_overflow in recent nodejs versions

    Make HTTP_MAX_HEADER_SIZE configurable

    So instead of using ng serve using command

    node --max-http-header-size=16385 ./node_modules/@angular/cli/bin/ng serve
    

    should be the solution to your problem

提交回复
热议问题