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

New Beta Vue UI Only Works Over Http #532

Closed
garysmi2 opened this Issue Aug 23, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@garysmi2
Contributor

garysmi2 commented Aug 23, 2017

Been wanting to try out the new UI, unfortunately I am running sitewhere behind haproxy, using haproxy as an ssl termination point.

In the login page for the UI where you input the server URL "http" is automatically appended to the URL that has been input by the user, so fails in browser due to the mixed-content restrictions.

Looks like it's in here:

sitewhere/sitewhere-ui/src/http/sitewhere-api-wrapper.js

export function createBaseUrl (store) {
return 'http://' + store.getters.server + ':' + store.getters.port +
'/sitewhere/api/'
}

I've tried modifying this file and running "npm run build" but any changes I make don't seem to get picked up by ./gradlew clean ServerTar (probably missing a step out)

I realise this is beta so maybe not a priority to you.

@derekadams derekadams self-assigned this Aug 23, 2017

@derekadams derekadams added the bug label Aug 23, 2017

@derekadams derekadams added this to the 1.13.0 milestone Aug 23, 2017

@derekadams

This comment has been minimized.

Member

derekadams commented Aug 23, 2017

Thanks for reporting the issue. We forgot to account for instances using SSL, so this is definitely a bug. Regarding the npm run build updates not showing up, the binaries generated by the sitewhere-ui build are not automatically moved into the war file. You can copy the contents of the sitewhere-ui/dist folder into sitewhere-web-admin/src/main/webapp/vueadmin and then run gradle clean serverZip to get an updated deployment.

Another option is to run the UI standalone. If you run SiteWhere on port 9090 (update conf/application.properties) and then run the UI via npm run dev, you can run the UI independently from SiteWhere. The development web server runs on 8080 by default, hence the need to swap SiteWhere to another port.

We will get a patched release with HTTPS support out today.

@garysmi2

This comment has been minimized.

Contributor

garysmi2 commented Aug 23, 2017

cheers Derek, from what I've seen so far running locally without ssl, it's looking pretty slick.

derekadams added a commit that referenced this issue Aug 24, 2017

@derekadams derekadams closed this Aug 24, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment