You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On a local instance there is an issue with pushing through a self generated SSL certificate - though the docs say that the local instance should be running in Flask debug mode which disables enforced trusted SSL checks.
On the CERN demo instance the error returned is for a missing referer. If a referer header is given it comes back as Referer checking failed - https://localhost:3000/ does not match any trusted origins.
A missing CSRF (Cross Site Request Forgery) token error is also sometimes given - though that should only apply to fetch requests from a browser - not backend (Python or Node).
No different whether using application tokens creating in InvenioRDM user profile.
For future ref: A bad referer error can be caused by an invalid token (as above). The InvenioRDM test site is sometimes reset - meaning all logins, uploads and personal access tokens are lost. The Referer error is misleading as it's not actually the cause or relevant.
Describe the bug
Posting data to the InvenioRDM API (
POST
to/api/records
) gives a 400 bad request. (https://inveniordm.docs.cern.ch/reference/rest_api_drafts_records/)On a local instance there is an issue with pushing through a self generated SSL certificate - though the docs say that the local instance should be running in Flask debug mode which disables enforced trusted SSL checks.
On the CERN demo instance the error returned is for a missing referer. If a referer header is given it comes back as
Referer checking failed - https://localhost:3000/ does not match any trusted origins.
A missing CSRF (Cross Site Request Forgery) token error is also sometimes given - though that should only apply to fetch requests from a browser - not backend (Python or Node).
No different whether using application tokens creating in InvenioRDM user profile.
Asked in the InvenioRDM discord channel:
https://discord.com/channels/692989811736182844/724974365451747329/938798216877596742
Awaiting response.
The text was updated successfully, but these errors were encountered: