Cors exception + Readme CopyPaste bug
See original GitHub issueCorsMiddleware.configure({})`
This throws unhandled promise rejection exception.
Passing null instead seems to do the trick
CorsMiddleware.configure(null)`
Also the Readme in CorsMiddleware uses HelmetMiddleware instead of CorsMiddleware. I assume this is a minor bug.
Is the MiddlewaresConsumer
any different that MiddlewareConsumer
(without s). Cause I couldnt find such class.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Debugging CORS problems for End-Users
CORS issues happen when the browser does not trust the endpoint that it is trying to reach. In order to allow calls from...
Read more >3 Ways to Fix the CORS Error — and How the Access- ...
Fix one: install the Allow-Control-Allow-Origin plugin. The quickest fix you can make is to install the moesif CORS extension .
Read more >Cannot copy-paste a container with a custom layout manager
I get following exceptions (printed in console): java.lang.InstantiationException: org.netbeans.modules.form.layoutsupport.DefaultLayoutSupport ...
Read more >How to enable cross-origin requests in Grails websocket ...
Grails-cors plugin is not working for grails 3.x, but there is some info in the repo readme. I'll copy/paste it here:.
Read more >tkrotoff/fetch
... to manually throw an exception on HTTP error status (like 404 or 500) ... npm install @tkrotoff/fetch ... Or copy-paste Http.ts into...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
published v6.0.1
Hi @wbhob & @anodynos ,
Took me two hours to realise this - I think the fix from #20 is not released in v6.0.0. https://github.com/wbhob/nest-middlewares/blob/v6.0.0/packages/cors/index.ts.
cors()
is called withoutelse
.With the fix, custom CORS options will work (i tested locally by making a copy of the middleware from master).
Hope you can release a new version soon so I don’t have to dup a local copy of the CORS middleware.