Question And Answer
问答系列
-
### Chrome in iOS,
history.pushState
will casue bottom toolbar to disappear.https://github.com/powerfulyang/powerfulyang.com/issues/23
So don't use history.pushState. -
### How to disable overflow-x scroolbar in
monaco-editor
?https://github.com/powerfulyang/powerfulyang.com/issues/28
options => wordWrap: 'on' -
### Safari don't send browser cookies during a 302 redirect
https://github.com/powerfulyang/api.powerfulyang.com/issues/46 https://developer.apple.com/forums/thread/113892
Safari executes redirect before reading all headers, set-cookie did after redirect. In iOS 15.3.1, set-cookie did behind redirect. -
### Nest.js, Error: Can't set headers after they are sent to the client
https://github.com/powerfulyang/api.powerfulyang.com/issues/50 https://powerfulyang.com/post/40
-
### Click to edit should ensure it exist.
Before go to edit page, ensure item exist to prevent crash. -
### OpenWrt can't resovle domain DNS to Local Area Network,LAN.
Uncheck Network => DCHP and DNS => General Settings => Rebind protection -
### NestJS Request Lifecycle.
In general, the request lifecycle looks like the following:
- Incoming request
- Globally bound middleware
- Module bound middleware
- Global guards
- Controller guards
- Route guards
- Global interceptors (pre-controller)
- Controller interceptors (pre-controller)
- Route interceptors (pre-controller)
- Global pipes
- Controller pipes
- Route pipes
- Route parameter pipes
- Controller (method handler)
- Service (if exists)
- Route interceptor (post-request)
- Controller interceptor (post-request)
- Global interceptor (post-request)
- Exception filters (route, then controller, then global)
- Server response
-
### Why have typescript property decorators stopped working after an upgrade?
The fix for TypeScript property decorators breaking when you upgrade TypeScript is to add
"useDefineForClassFields": false
to yourtsconfig.json
.