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
Describe the bug
I've tried to use the Action with all provided secret keys, but the authorization on CloudFlare didn't work.
To Reproduce
Steps to reproduce the behavior:
Do everything like in the docs. The API token of CloudFlare is made only to access the Pages of the account, read access.
Expected behavior
The action works
Additional context
The action calls the https://api.cloudflare.com/client/v4/accounts/***/pages/projects/project-name/deployments API method of CloudFlare with the X-Auth-Key and X-Auth-email headers. This request returns the 400 error with 10000 (Unauthorized) status inside the return data.
I've tried requesting this method from Postman, and here's what I've found. As it is said in the CloudFlare community, the Authorization header works better than other header when we access the CloudFlare API.
I propose changing this logic in the action code. In this case, the CLOUDFLARE_ACCOUNT_EMAIL variable won't be needed at all.
I can make the PR solving this issue, if you agree with the changes.
The text was updated successfully, but these errors were encountered:
Strange, thanks for raising the issue! According to their docs, X-Auth-Key is the "official" authentication method.
I guess an easy, non-breaking change would be to check if the email is set, and if not, use the Authorization header, otherwise stick to X-Auth-Key, what do you think?
Describe the bug
I've tried to use the Action with all provided secret keys, but the authorization on CloudFlare didn't work.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The action works
Additional context
The action calls the
https://api.cloudflare.com/client/v4/accounts/***/pages/projects/project-name/deployments
API method of CloudFlare with theX-Auth-Key
andX-Auth-email
headers. This request returns the 400 error with 10000 (Unauthorized) status inside the return data.I've tried requesting this method from Postman, and here's what I've found. As it is said in the CloudFlare community, the
Authorization
header works better than other header when we access the CloudFlare API.I propose changing this logic in the action code. In this case, the
CLOUDFLARE_ACCOUNT_EMAIL
variable won't be needed at all.I can make the PR solving this issue, if you agree with the changes.
The text was updated successfully, but these errors were encountered: