Preventing cross-origin request
Limiting request to 10MB
Fixing small bugs when using both http and https