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 access the host uri? #39

Open
eminx opened this issue Aug 21, 2024 · 1 comment
Open

How to access the host uri? #39

eminx opened this issue Aug 21, 2024 · 1 comment

Comments

@eminx
Copy link

eminx commented Aug 21, 2024

My application is designed and works in a way that I host many different websites in one server and db.
Every each content that is generated by users in each website is saved with its host uri - that is the website address.

I can retrieve the connected client host uri in each method call in Meteor, like this:

Meteor.methods({
  getData() {
    const host = this.connection.httpHeaders.host;
    return Collection.find({host: host}).fetch();
  }
});

My problem is in the React component rendered in the server, I cannot access the host uri with this above function or similar! Any ideas?

Thanks!

Copy link

Thank you for submitting this issue!

We, the Members of Meteor Community Packages take every issue seriously.
Our goal is to provide long-term lifecycles for packages and keep up
with the newest changes in Meteor and the overall NodeJs/JavaScript ecosystem.

However, we contribute to these packages mostly in our free time.
Therefore, we can't guarantee you issues to be solved within certain time.

If you think this issue is trivial to solve, don't hesitate to submit
a pull request, too! We will accompany you in the process with reviews and hints
on how to get development set up.

Please also consider sponsoring the maintainers of the package.
If you don't know who is currently maintaining this package, just leave a comment
and we'll let you know

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

1 participant