Skip to content

Custom Header support  #292

@netwolfuk

Description

@netwolfuk

Description

I'm writing an API that integrates OpenHAB's HaBot with Signal. I plan to publish it as a container along with a compose file that shows users how to run the containers together, but ultimately I can't enforce users to run a reverse proxy.

It would therefore be helpful to be able to configure headers like CORS in this API gateway so that a UI can talk to SSA

Solution

Add the ability to set headers that can be returned by the server. I looked at the headers information in the readme, but that appears to be mainly related to request headers and mapping those to Auth keys.

We'd also need to be able to enable the OPTIONS verb to handle preflight requests. Some knowledge of which endpoints support which methods would be good. Maybe we need some sort of mapping configuration, unless SSA already knows the verbs each endpoint supports and can reply correctly to an OPTIONS request.

Alternatives

  • Of course we can do this in the fronting server, but even I have not setup Apache yet, and I have the best intentions.

  • Alternatively host all services on one URL. Eg, Apache (or nginx or haproxy) fronting all of the following.

    • SCRA
    • Openhab
    • SSA
    • My Signal HaBot bridge

Additional Context

Initially I just want to build a small UI to configure my bridge. It needs to call SSA to get groups info and show/allow configuration of trusted numbers. Maybe signal groups creation and permissions.

A stretch goal might be the ability to do all the setup of SCRA from a UI too. I'm referring to requesting the Auth SMS/voice call and doing the captcha, etc.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestplannedSomething is planned and has been added to the backlogspriority/mediumSomething is of medium priorityquestionFurther information is requestedscale/smallThis is a small change

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions