Skip to content

Commit

Permalink
Limit browser checks to libs only for CORS via @require (#1829)
Browse files Browse the repository at this point in the history
* Enough testing on main .user.js... seems solid.

Post #1826

Auto-merge
  • Loading branch information
Martii authored Jul 23, 2021
1 parent cab7e47 commit dc662c1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion controllers/scriptStorage.js
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,9 @@ exports.sendScript = function (aReq, aRes, aNext) {
source = chunks.join(''); // NOTE: Watchpoint

// Send the script
aRes.set('Access-Control-Allow-Origin', '*');
if (aScript.isLib) {
aRes.set('Access-Control-Allow-Origin', '*');
}
aRes.set('Content-Type', 'text/javascript; charset=UTF-8');
aStream.setEncoding('utf8');

Expand Down

0 comments on commit dc662c1

Please sign in to comment.