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

Form for Access Control Allow Origin #218

Conversation

deathart
Copy link

Hi everyone, to start off sorry about my English, I'm using a translator.

I have created a web interface with Angular, which is problematic (that's not bad at all) with the "Access Control Allow Origin" header.

That's why I created a small form to manage this option to avoid to put it hard in the code and that it is modifiable.

@PhyxionNL
Copy link
Collaborator

A setting for this would be fine but this is such a limited use case that I don't see a need to add this to UI.

@deathart
Copy link
Author

For my part I needed a modifiable field because my dev and prod environment are totally different so I found it more practical. Otherwise if you have to modify it by hand I find it long and annoying.

Why not make a general form for the web server ? allowing to modify the port, the header "Access Control Allow Origin" and other parameters.

By the same occasion why are the requests to retrieve the sensors in POST and not in GET ?

@PhyxionNL
Copy link
Collaborator

I've not written that so the reason I don't know. I understand your use case but I don't think this is something you want to change frequently so adding a form for just this setting seems too much. I would accept the changes to HttpServer.cs and MainForm.cs (apart from the ServerAccessControl_Click method)

@deathart
Copy link
Author

All right, if not why not make a general form for the web server ? allowing to modify the port, the header "Access Control Allow Origin" and other parameters.

By the same occasion why are the requests to retrieve the sensors in POST and not in GET ?

@lordmortis
Copy link
Contributor

@deathart should we instead add Get methods for data retrieval? (which, i must admit, seems more REST-y?)

@deathart
Copy link
Author

deathart commented Apr 5, 2020

We all agree that the GET' is more REST API'.

I'm testing my rating to rework the WebServer part that I think is "obsolete".

@PhyxionNL
Copy link
Collaborator

If you add this option to the new authentication form (so the access control form can be removed) I can merge this. You'll need to rebase it on master.

@deathart
Copy link
Author

The best way to close this PR is for me to recreate a new, cleaner one.

@deathart deathart closed this May 25, 2020
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

Successfully merging this pull request may close these issues.

3 participants