Skip to content

Commit

Permalink
Merge pull request #78 from casper-network/hubspot-form-improv
Browse files Browse the repository at this point in the history
MODIFIED: ip retrieved from initial form retrieval for hubspot
  • Loading branch information
sd-ditoy authored Nov 13, 2023
2 parents a1b9be6 + 44e0836 commit 221dd31
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docker/nginx-default.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ server {
set $CSP_STYLE "style-src 'self' 'unsafe-inline'";
set $CSP_FONT "font-src 'self' https:";
set $CSP_SCRIPT "script-src 'self' 'unsafe-eval' 'unsafe-inline' https:";
set $CSP_CONNECT "connect-src 'self' blob: https: http://ip-api.com http://ip-api.com/json/";
set $CSP_CONNECT "connect-src 'self' blob: https:";
set $CSP_MEDIA "media-src 'self' blob: https:";
set $CSP_OBJECT "object-src 'none'";
set $CSP_WORKER "worker-src blob:";
Expand Down
8 changes: 1 addition & 7 deletions src/components/blocks/HubspotForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -268,13 +268,7 @@ export default {
this.$v.$touch();
if (!this.$v.$invalid) {
const hubspotUtk = Cookie.get('hubspotutk');
let ipAddress = null;
const ipResponse = await fetch('http://ip-api.com/json/');
if (ipResponse) {
const ipData = await ipResponse.json();
ipAddress = ipData.query;
}
const ipAddress = this.definition?.ip || null;
const definition = this.computedFields;
const fields = [];
definition.forEach((def) => {
Expand Down

0 comments on commit 221dd31

Please sign in to comment.