Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com

HTTP 405: Requests from origin server not allowed.

Overview

The 405 error occurs when a cross-origin request is initiated, and the Origin server specified in the request headers does not align with the expected server. This issue arises when the Origin server differs from the URL of the requested resource.

Resolution

Ensure the Origin server URL (found in browser console or os.log) is whitelisted in the application's "Allowed Request Origins" setting (Home → Settings → Common).

image-20241122-095919.png

Allowed Requests

  1. There is no Origin header.

  2. The Origin header value matches the requested URL or resource.

  3. The Origin header value is in the "Allowed Request Origins" setting.

All other requests will result in a 405 error.

How to identify the Origin URL

The origin URL can be found in the os.log file (Home → Extras → Errors → View logs).
E.g.
ERROR com.krishagni.catissueplus.rest.filter.AuthTokenFilter - Requests from the origin <URL> are not allowed to the URL: <URL>.

The request should succeed without a 405 error.

 

Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com