crudbooster icon indicating copy to clipboard operation
crudbooster copied to clipboard

Api Headers not work with postman

Open azarzaza opened this issue 7 years ago • 4 comments

API Headers Not work with postman by default in postman we have used the CryptoJS.MD5 to make the md5 key but the key doesn't match with our API key so

if you want to test the API's in postman make some condition in CRUDBooster.php

$sender_token = Request::header('X-Authorization-Token'); changed to

if(Request::header('X-From') == 'postman') { $token = Request::header('X-Authorization-Token'); $sender_token = md5($token.$time.$user_agent); } else{ $sender_token = Request::header('X-Authorization-Token'); } and put the X-From header in postman and send the value as postman In X-Authorization-Token send your api token only

its only for debugging purpose

azarzaza avatar Sep 18 '17 09:09 azarzaza

@azarzaza Where can I find the file CRUDBooster.php, bro?

ghost avatar Oct 11 '17 08:10 ghost

helper folder

On Wed, Oct 11, 2017 at 1:45 PM, khoatran9x [email protected] wrote:

@azarzaza https://github.com/azarzaza Where can I find the file CRUDBooster.php, bro?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/crocodic-studio/crudbooster/issues/846#issuecomment-335726797, or mute the thread https://github.com/notifications/unsubscribe-auth/AWLoufR9saYKedz3Tnj42kQWDF6gXOKrks5srHkHgaJpZM4PaqAx .

azarzaza avatar Oct 11 '17 08:10 azarzaza

This works here. Use pre-request script.

image image

brunotda avatar May 20 '20 16:05 brunotda

When i am test on postman return this script.

asim3065 avatar Jun 26 '21 11:06 asim3065