Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sending Authorization header #2452

Open
2 of 10 tasks
Jayp2002 opened this issue Jan 10, 2023 · 2 comments
Open
2 of 10 tasks

Sending Authorization header #2452

Jayp2002 opened this issue Jan 10, 2023 · 2 comments

Comments

@Jayp2002
Copy link

Jayp2002 commented Jan 10, 2023

  • SystemJS Version:
  • Which library are you using?
    • system.js
    • s.js
    • system-node.cjs
  • Which extras are you using?
    • AMD extra
    • Named Exports
    • Named Register
    • Transform
    • Use Default
    • Global
    • Dynamic Import Maps
  • Are you using any custom hooks?

Question

How can i send authorisation header? I am using meta tag to set headers but getting CORS error when the request is made. Is there any other config I need to set?

meta: {
'*': { authorization: window.localStorage.token }
},

@noherczeg
Copy link

CORS issues have nothing to do with systemjs. CORS configuration is always done on the backend / reverse proxy side.

Authorization headers are related to security (authentication / authorization) which is again, not the scope of systemjs.

@wenerme
Copy link
Collaborator

wenerme commented Mar 21, 2023

You can customize fetch to do this, override system.fetch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants