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

how to add csrf token to the upload request? #45

Closed
dvlpr-shivendra opened this issue Sep 27, 2019 · 2 comments
Closed

how to add csrf token to the upload request? #45

dvlpr-shivendra opened this issue Sep 27, 2019 · 2 comments

Comments

@dvlpr-shivendra
Copy link

No description provided.

@basdog22
Copy link

Hi. Did you manage to do this? How?

@snake-py
Copy link

In Laravel I did:

// int template file 
var token = "{{ csrf_token()}}"

// within editor
tools: {
        image: {
            class: Image,
            config: {
                additionalRequestHeaders: {
                    "X-CSRF-TOKEN": token
                },
                endpoints: {
                    byFile: uploadeRoute
                }
            }
        },

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