Skip to content
This repository has been archived by the owner on Oct 11, 2022. It is now read-only.

Publications not available via http options #152

Open
ghost opened this issue May 8, 2018 · 0 comments
Open

Publications not available via http options #152

ghost opened this issue May 8, 2018 · 0 comments

Comments

@ghost
Copy link

ghost commented May 8, 2018

I noticed that every method has both POST and OPTIONS enabled by default, however, that's not true for publications.
I am currently working on an angular project in order to integrate with my meteor app, and most of the GET requests are antecipated by an OPTIONS request, which in turn are not available as meteor rest endpoints.
I've been using the code below as a workaround, but I consider it error-prone and not productive at all: I'm always going back to my code looking for some error when I realize I just forgot to add these three lines...

JsonRoutes.add('options', '/publications/my_publication_collection', (req, res) => {
    JsonRoutes.sendResult(res, {});
});

My current packages are:
simple:rest
simple:json-routes
simple:rest-json-error-handler
simple:rest-accounts-password
simple:authenticate-user-by-token

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

No branches or pull requests

0 participants