Skip to content

Commit

Permalink
Clean things up before 5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
antonrasmussen committed Nov 23, 2024
1 parent f11d751 commit de88c47
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions assignments/Rasmussen/5/5.1/data_server.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ http.createServer((req, res) => {
return;
}
// Note: No CORS headers are set here, the client can't access the data
res.writeHead(200, { 'Content-Type': 'application/json' });
// res.writeHead(200, { 'Content-Type': 'application/json' });

// With CORS headers set, the client can access the data
// res.writeHead(200, {
// 'Content-Type': 'application/json',
// 'Access-Control-Allow-Origin': '*', // Allow all origins
// });
res.writeHead(200, {
'Content-Type': 'application/json',
'Access-Control-Allow-Origin': '*', // Allow all origins
});

res.end(data);
});
Expand Down
Binary file added assignments/Rasmussen/5/images/cors_allowed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assignments/Rasmussen/5/images/cors_blocked.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assignments/Rasmussen/5/images/cors_error.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assignments/Rasmussen/5/images/cors_success.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit de88c47

Please sign in to comment.