Browse Source

browser-sync

windhamdavid 1 month ago
parent
commit
ad5f380ae3
2 changed files with 6 additions and 6 deletions
  1. 2 2
      functions.php
  2. 4 4
      gulpfile.js

+ 2 - 2
functions.php

@@ -29,7 +29,7 @@ function uhp24_disable_remote_patterns() {
 ************************************************************/
 
 function add_cors_http_header(){
-	header('Access-Control-Allow-Origin: https://srh.ovid:333');
+	header('Access-Control-Allow-Origin: https://uhp.ovid:333');
 	header('Access-Control-Allow-Credentials: true');
 	header('Access-Control-Allow-Headers: X-WP-Nonce', false );
 }
@@ -40,7 +40,7 @@ function uhp24_browsersync_save() {
     'blocking' => false,
     'sslverify' => false
   ];
-  $request = wp_remote_get('https://srh.ovid:333/uhp/__browser_sync__?method=reload', $args);
+  $request = wp_remote_get('https://uhp.ovid:333/__browser_sync__?method=reload', $args);
 }
 add_action('rest_after_insert_page', 'uhp24_browsersync_save', 10, 3);
 add_action('rest_after_insert_post', 'uhp24_browsersync_save', 10, 3);

+ 4 - 4
gulpfile.js

@@ -9,12 +9,12 @@ function reload(cb) {
 function run() {
   browserSync.init({
     open: 'external',
-    host: 'srh.ovid',
-    proxy: 'https://srh.ovid/uhp/',
+    host: 'uhp.ovid',
+    proxy: 'https://uhp.ovid',
     port: '333',
     ssl: {
-      key: '/opt/homebrew/etc/httpd/ssl/srh.ovid-key.pem',
-      cert: '/opt/homebrew/etc/httpd/ssl/srh.ovid.pem'
+      key: '/opt/homebrew/etc/httpd/ssl/uhp.ovid-key.pem',
+      cert: '/opt/homebrew/etc/httpd/ssl/uhp.ovid.pem'
     }
   });
   gulp.watch(['./*.json','./**/*.html','./**/*.php','./**/*.css','./**/*.js' ]).on('change',browserSync.reload);