Essential s๐ž๐œ๐ฎ๐ซ๐ข๐ญ๐ฒ ๐‡๐ž๐š๐๐ž๐ซ๐ฌ ๐ข๐ง ๐€๐๐ˆ ๐Ÿš€

Essential s๐ž๐œ๐ฎ๐ซ๐ข๐ญ๐ฒ ๐‡๐ž๐š๐๐ž๐ซ๐ฌ ๐ข๐ง ๐€๐๐ˆ ๐Ÿš€

ยท

1 min read

You can include various important information in the header for the server to understand.

๐€๐œ๐œ๐ž๐ฉ๐ญ: ๐š๐ฉ๐ฉ๐ฅ๐ข๐œ๐š๐ญ๐ข๐จ๐ง/๐ฃ๐ฌ๐จ๐ง - Specifies the data type we want from the server
๐‚๐จ๐ง๐ญ๐ž๐ง๐ญ-๐ญ๐ฒ๐ฉ๐ž: ๐š๐ฉ๐ฉ๐ฅ๐ข๐œ๐š๐ญ๐ข๐จ๐ง/๐ฃ๐ฌ๐จ๐ง - Specifies the data type we want to send to server
๐€๐ฎ๐ญ๐ก๐จ๐ซ๐ข๐ณ๐š๐ญ๐ข๐จ๐ง - Used to pass the token
๐€๐œ๐œ๐ž๐ฌ๐ฌ-๐‚๐จ๐ง๐ญ๐ซ๐จ๐ฅ-๐€๐ฅ๐ฅ๐จ๐ฐ-๐Ž๐ซ๐ข๐ ๐ข๐ง - This header needs to be set up by the server to resolve CORS issues
๐—-๐‚๐จ๐ง๐ญ๐ž๐ง๐ญ-๐“๐ฒ๐ฉ๐ž-๐Ž๐ฉ๐ญ๐ข๐จ๐ง๐ฌ: ๐ง๐จ๐ฌ๐ง๐ข๐Ÿ๐Ÿ - Helps prevent cross-site scripting (XSS) attacks
๐‚๐จ๐ง๐ญ๐ž๐ง๐ญ-๐’๐ž๐œ๐ฎ๐ซ๐ข๐ญ๐ฒ-๐๐จ๐ฅ๐ข๐œ๐ฒ - Allows you to restrict which resources (such as JavaScript, CSS, Images, etc.) can be loaded

ย