Skip to content

Commit bf68a27

Browse files
committed
new Cloudflare requirement
1 parent 2ecf342 commit bf68a27

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

lib/thingiverse.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ public static function get_authorization_token(){
5353
//Returns a Json object
5454
public static function get_authorized_url_json($url){
5555

56-
$authorization_header = 'Authorization: Bearer '.Thingiverse::get_authorization_token();
56+
$authorization_header = array(
57+
'Authorization: Bearer '.Thingiverse::get_authorization_token(),
58+
'Referer: '.Thingiverse::BASE_URL
59+
);
5760
$options = ['http' => ['header' => $authorization_header]];
5861
$context = stream_context_create($options);
5962
$json = file_get_contents($url, false, $context);

0 commit comments

Comments
 (0)