Code Monkey home page Code Monkey logo

Comments (7)

JeazW avatar JeazW commented on June 19, 2024

i got it,now i am just handling the CORS problem

from excalidraw-libraries.

inityun avatar inityun commented on June 19, 2024

i got it,now i am just handling the CORS problem

Did you succeed? if you are succeed. please tell me how it work? thanks

from excalidraw-libraries.

JeazW avatar JeazW commented on June 19, 2024

i got it,now i am just handling the CORS problem

Did you succeed? if you are succeed. please tell me how it work? thanks

git clone https://github.com/excalidraw/excalidraw.git
cd excalidraw/
yarn
yarn start

if you dont have yarn,run "npm install -g yarn" first

from excalidraw-libraries.

inityun avatar inityun commented on June 19, 2024
git clone https://github.com/excalidraw/excalidraw.git
cd excalidraw/
yarn
yarn start

if you dont have yarn,run "npm install -g yarn" first

yes. install excalidraw is very easy.
in my server. I install excalidraw. i also down the excalidraw libraries project. copy to my nginx or apache root directory.it works.
But in my local excalidraw libraries website, click "Add To Excalidraw" button. Dont work.
Have you encountered this situation?
If I use my local excalidraw + official excalidraw libraries website, click "Add to excalidraw" button is work.

from excalidraw-libraries.

JeazW avatar JeazW commented on June 19, 2024
git clone https://github.com/excalidraw/excalidraw.git
cd excalidraw/
yarn
yarn start

if you dont have yarn,run "npm install -g yarn" first

yes. install excalidraw is very easy. in my server. I install excalidraw. i also down the excalidraw libraries project. copy to my nginx or apache root directory.it works. But in my local excalidraw libraries website, click "Add To Excalidraw" button. Dont work. Have you encountered this situation? If I use my local excalidraw + official excalidraw libraries website, click "Add to excalidraw" button is work.

that is just what i said "CORS" problem,you just need to add two lines in your nginx conf :
in the libraries's conf:

                 add_header Access-Control-Allow-Origin http://excalidraw.mydomain.com;
                 add_header Access-Control-Allow-Method POST,GET;

in the excalidraw's conf :

                 add_header Access-Control-Allow-Origin http://excalidraw-libraries.mydomain.com;
                 add_header Access-Control-Allow-Method POST,GET;

here is my excalidraw.conf,mybe it's not perfect,but it does work:

server {
        listen 80;
        server_name excalidraw.mydomain.com
        location / {
                 proxy_http_version 1.1;
                 proxy_set_header Upgrade $http_upgrade;
                 proxy_set_header Connection "upgrade";
                 proxy_redirect off;
                 proxy_set_header       Host $host:$server_port;
                 proxy_set_header  X-Real-IP  $remote_addr;
                 proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
                 proxy_set_header X-Forwarded-Proto  $scheme;
                 proxy_pass http://127.0.0.1:3000;
                 add_header Access-Control-Allow-Origin http://excalidraw-libraries.mydomain.com;
                 add_header Access-Control-Allow-Method POST,GET;
        }

}

from excalidraw-libraries.

inityun avatar inityun commented on June 19, 2024
git clone https://github.com/excalidraw/excalidraw.git
cd excalidraw/
yarn
yarn start

if you dont have yarn,run "npm install -g yarn" first

yes. install excalidraw is very easy. in my server. I install excalidraw. i also down the excalidraw libraries project. copy to my nginx or apache root directory.it works. But in my local excalidraw libraries website, click "Add To Excalidraw" button. Dont work. Have you encountered this situation? If I use my local excalidraw + official excalidraw libraries website, click "Add to excalidraw" button is work.

that is just what i said "CORS" problem,you just need to add two lines in your nginx conf : in the libraries's conf:

                 add_header Access-Control-Allow-Origin http://excalidraw.mydomain.com;
                 add_header Access-Control-Allow-Method POST,GET;

in the excalidraw's conf :

                 add_header Access-Control-Allow-Origin http://excalidraw-libraries.mydomain.com;
                 add_header Access-Control-Allow-Method POST,GET;

here is my excalidraw.conf,mybe it's not perfect,but it does work:

server {
        listen 80;
        server_name excalidraw.,ydomain.com
        location / {
                 proxy_http_version 1.1;
                 proxy_set_header Upgrade $http_upgrade;
                 proxy_set_header Connection "upgrade";
                 proxy_redirect off;
                 proxy_set_header       Host $host:$server_port;
                 proxy_set_header  X-Real-IP  $remote_addr;
                 proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
                 proxy_set_header X-Forwarded-Proto  $scheme;
                 proxy_pass http://127.0.0.1:3000;
                 add_header Access-Control-Allow-Origin http://excalidraw-libraries.ydomain.com;
                 add_header Access-Control-Allow-Method POST,GET;
        }

}

thanks, I try it.

from excalidraw-libraries.

inityun avatar inityun commented on June 19, 2024
git clone https://github.com/excalidraw/excalidraw.git
cd excalidraw/
yarn
yarn start

if you dont have yarn,run "npm install -g yarn" first

yes. install excalidraw is very easy. in my server. I install excalidraw. i also down the excalidraw libraries project. copy to my nginx or apache root directory.it works. But in my local excalidraw libraries website, click "Add To Excalidraw" button. Dont work. Have you encountered this situation? If I use my local excalidraw + official excalidraw libraries website, click "Add to excalidraw" button is work.

that is just what i said "CORS" problem,you just need to add two lines in your nginx conf : in the libraries's conf:

                 add_header Access-Control-Allow-Origin http://excalidraw.mydomain.com;
                 add_header Access-Control-Allow-Method POST,GET;

in the excalidraw's conf :

                 add_header Access-Control-Allow-Origin http://excalidraw-libraries.mydomain.com;
                 add_header Access-Control-Allow-Method POST,GET;

here is my excalidraw.conf,mybe it's not perfect,but it does work:

server {
        listen 80;
        server_name excalidraw.mydomain.com
        location / {
                 proxy_http_version 1.1;
                 proxy_set_header Upgrade $http_upgrade;
                 proxy_set_header Connection "upgrade";
                 proxy_redirect off;
                 proxy_set_header       Host $host:$server_port;
                 proxy_set_header  X-Real-IP  $remote_addr;
                 proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
                 proxy_set_header X-Forwarded-Proto  $scheme;
                 proxy_pass http://127.0.0.1:3000;
                 add_header Access-Control-Allow-Origin http://excalidraw-libraries.mydomain.com;
                 add_header Access-Control-Allow-Method POST,GET;
        }

}

thanks, the problem is "CORS", I edit nginx.conf, add some code. It works. thanks very much!

from excalidraw-libraries.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.