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

Connect to JabRef online #30

Open
tobiasdiez opened this issue Jun 9, 2021 · 2 comments · May be fixed by #152
Open

Connect to JabRef online #30

tobiasdiez opened this issue Jun 9, 2021 · 2 comments · May be fixed by #152

Comments

@tobiasdiez
Copy link
Member

Currently, one needs to start JabRef online locally as well for login etc to work. For easier testing, one should use https://jabref-online.herokuapp.com/api instead as a default (with the possibility to easily change it to say localhost:4000/api).

The first problem in doing this, is that jabref online@heroku is not allowing cross-origin requests. @mohit038 could you please try out if adding the following (in this or modified form) to the webpack config works:

devServer: {
    proxy: {
      '/api': 'https://jabref-online.herokuapp.com`,
    },
  },

see https://webpack.js.org/configuration/dev-server/#devserverproxy
(I think it would be good to use an environment variable for the server-url that can be provided using an env file, so that it's easy to change this to say localhost).
Mohit, please correct me if I'm wrong, but we don't face similar CORS issues in production, since we could then simply host the word addin on the same url has the jabref online api, right?

@tobiasdiez tobiasdiez added the type: enhancement Improving upon an existing feature label Jun 9, 2021
@tobiasdiez
Copy link
Member Author

Once JabRef/JabRefOnline#217 is implemented, the test server should accept proxy requests while the staging + production server don't.

@tobiasdiez tobiasdiez changed the title Connect to JabRef online (heroku) Connect to JabRef online Jul 5, 2021
@tobiasdiez
Copy link
Member Author

This should work now. The test server at https://jabref-dev.azurewebsites.net/ runs against the test data found in https://github.com/JabRef/JabRefOnline/blob/main/prisma/seed.ts and should admit requests from proxies (but not CORS).

@mohit038-zz mohit038-zz linked a pull request Aug 16, 2021 that will close this issue
@tobiasdiez tobiasdiez added p4: important type: developer experience and removed type: enhancement Improving upon an existing feature labels Apr 21, 2023
@tobiasdiez tobiasdiez self-assigned this Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

1 participant