“Error 403: access_denied” from Google authentication web api despite google account being owner

To fix this issue for me was this simple: Go to https://console.developers.google.com/ On the top left beside the words “Google APIs” click the project dropdown on the right Ensure that your correct project is selected Click “OAuth consent screen” on the left side of the screen (below “Credentials”) If you have not created a consent … Read more

Django returns 403 error when sending a POST request

Look here https://docs.djangoproject.com/en/dev/ref/csrf/#how-to-use-it. Try marking your view with @csrf_exempt. That way, Django’s CSRF middleware will ignore CSRF protection. You’ll also need to use from django.views.decorators.csrf import csrf_exempt. See: https://docs.djangoproject.com/en/dev/ref/csrf/#utilities Please be advised that by disabling CSRF protection on your view, you are opening a gate for CSRF attacks. If security is vital to you then … Read more

Can’t access /elmah on production server with Elmah MVC?

You need to enable Elmah for remote access by adding the following configuration setting to the <elmah> section in your web.config file. The default setting for this value is false, which only allows localhost, hence why it is working on your local machine from within Visual Studio. <elmah> <security allowRemoteAccess=”true”/> </elmah> I always seem to … Read more

Any way to get the response body during HTTP errors?

I asked this question on their github page and got an answer from cnoon: swift 2: if let data = response.data { let json = String(data: data, encoding: NSUTF8StringEncoding) print(“Failure Response: \(json)”) } swift 3: if let data = response.data { let json = String(data: data, encoding: String.Encoding.utf8) print(“Failure Response: \(json)”) } https://github.com/Alamofire/Alamofire/issues/1059 I just … Read more

Apache gives me 403 Access Forbidden when DocumentRoot points to two different drives

You did not need Options Indexes FollowSymLinks MultiViews Includes ExecCGI AllowOverride All Order Allow,Deny Allow from all Require all granted the only thing what you need is… Require all granted …inside the directory section. See Apache 2.4 upgrading side: http://httpd.apache.org/docs/2.4/upgrading.html

What is the most appropriate HTTP status code to return if a required header is missing?

400 Bad Request It’s a user error in the request. Unlike with a 403, the client should be allowed to repeat their request, but only after modification: 10.4.1 400 Bad Request The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications. Edit As … Read more