purab
purab

Reputation: 211

charles proxy add code into head tag

I am using the charles proxy for unit testing the my some functionality. I wanted to add the style.css file into some site.

I am using the rewrite rule this. I wanted to add the my custom CSS into the head section of webpage.

Can anybody knows about this. How to inject the custom code into webpage using charles proxy.

Upvotes: 3

Views: 3529

Answers (1)

purab
purab

Reputation: 211

I am able to inject the script tag and css tag into head section. I used the Rewrite URL Body and update Response Body using find and replace code.

Go to Tools>Rewrite and then add the sets. Add the Rules, Select Type Body. do setting as per following. Do not forget the add the code at the end of replace value.

charles proxy setting for rewrite

Upvotes: 5

Related Questions