Trying to access the following from another server on our network:
This is the response I get:
Failed to load https://bitbucket.*******.com:8443/rest/api/1.0/projects/LAM/repos/trigger_every_5_min/branches?filterText=feature/&limit=1000: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.
How do I set the following on Bitbucket server:
Access-Control-Allow-Origins: *
Access-Control-Allow-Methods: GET,PUT,OPTIONS,POST
Access-Control-Allow-Headers: Authorization
Thanks in advance for any input!
It doesn't seem like Bitbucket comes with the option for cors headers.
I guess the best option is to stand up an nginx (or apache) sever in the middle and use is as a reverse proxy.
It appears you are hitting an XSRF security issue in which it is failing to acquire a token from the server. You can opt-out of this by providing the following in your curl call:
X-Atlassian-Token: no-check
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.