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

Support CORS #67

Closed
ocomsoft opened this issue Nov 9, 2018 · 4 comments
Closed

Support CORS #67

ocomsoft opened this issue Nov 9, 2018 · 4 comments
Labels
duplicate This issue or pull request already exists

Comments

@ocomsoft
Copy link

ocomsoft commented Nov 9, 2018

I am far from an expert but while attempting to write a simple chat app in Vuejs to an existing running server I had to use a proxy to access the service

@ocomsoft
Copy link
Author

ocomsoft commented Nov 9, 2018

I have created a VERY basic Vue App to use Gotify like a chat server as a proof of concept. https://github.com/ocomsoft/vhat
If we could configure CORS to allow certain addresses this code would not need to use the proxy stuff in vue.config.js and would talk directory to the Gotify server.

I hope this helps..

@jmattheis
Copy link
Member

Thanks for your time, for making this app with Gotify (:

When you build Gotify in dev mode, then the headers will already be set see https://github.com/gotify/server/blob/master/router/router.go#L44 (dev mode would be just building Gotify with go build app.go). Also there is an issue for making the response headers configurable see #23

@ocomsoft
Copy link
Author

ocomsoft commented Nov 9, 2018

Thank you. I would rather just use the configuration.

@ocomsoft ocomsoft closed this as completed Nov 9, 2018
@ocomsoft
Copy link
Author

ocomsoft commented Nov 9, 2018

No need for this to stay here when the #23 issue is fixed this would not be an issue.

@jmattheis jmattheis added the duplicate This issue or pull request already exists label Nov 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Development

No branches or pull requests

2 participants