Skip to content

How to access the host uri? #39

@eminx

Description

@eminx

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions