Jump to content

netcarver

PW-Moderators
  • Posts

    2,136
  • Joined

  • Last visited

  • Days Won

    42

netcarver last won the day on July 14 2021

netcarver had the most liked content!

Profile Information

  • Gender
    Male
  • Location
    UK

Recent Profile Visitors

17,146 profile views

netcarver's Achievements

Hero Member

Hero Member (6/6)

3k

Reputation

18

Community Answers

  1. Another option would be a 1 minute cron job on a VPS. It could call a script (bash or PHP maybe) that curls through to your API provider and send yourself an email/sms if it fails. Would give you more flexibility to test POST requests.
  2. Hello @markus_blue_tomato If it's only GET requests you need to monitor, you could use Uptime Robot's free tier - it issues a request to the target address every 5 minutes and emails you if it is down. I've used it for years and it has been very reliable.
  3. Is that useragent string a constant across all requests, or just the "amazonbot" part? Either way, if you have access to WireRequestBlocker from the ProDevTools package, you could target the useragent with a block rule. If you don't have access to WireRequestBlocker, then an .htaccess rule could be used to reject those requests. There are some examples here.
  4. Just to add a caveat to blocking vendor/ - this sometimes leads to unservable asset issues (such as JS/fonts/images/styles) if the composer package includes such things. YMMV with this approach, but the inspector in the browser can help tracking these down.
  5. Hi @HakeshDigital Does it work if you remove, or comment out, the indicated line from your .htaccess file... RewriteCond %{REQUEST_URI} ^(.*)/([a-z]{2})$ RewriteRule ^(.*/)(es|en|it|pt)$ $1$2/ [R=301,L] RewriteRule ^(.*/)es$ ^(.*/)es/ [R=301] ## <<< Remove this line, or comment out with # at the start. RewriteCond %{REQUEST_FILENAME} !-f RewriteRule (.+(?:es|en|it|pt))$ /$1/ [L,R=301] RewriteCond %{REQUEST_URI} ^/([a-z]{2})/ RewriteRule ^ - [E=LANG:%1] RewriteCond %{ENV:LANG} !^$ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !(.*)/$ RewriteRule ^(.*)$ /$1/ [L,R=301] ...?
  6. $d = strtotime('next monday +7 days'); echo date('Y-m-d', $d); Seems to work for me.
  7. Thank you for this @TomPich always good to see people giving back to the community, much appreciated!
  8. I've not tried this one, but perhaps @bernhard's RockSkinUiKit module can do it?
  9. Interesting concept. I'm with Bernhard when he suggested making the help text fixed in the middle. Half of the time the instructions are upside down (being in the bottom half of the screen) and moving - so hard to read unless you wait for it to make it back up. Could also do with some more contrast for those of us with slightly compromised sight. Thanks for sharing though.
  10. @cwsoft How's this? https://github.com/processwire/processwire/blob/3cc76cc886a49313b4bfb9a1a904bd88d11b7cb7/wire/core/Password.php#L115
  11. I'm not sure of the context of your call to truncate(), but perhaps you could run the sanitizer on the output of strip_tags()?
  12. Would there be any merit in submitting your changes as a PR against the original, maybe with some suitable config settings to allow control of target templates/roles etc?
  13. Hi @Greg Lumley That's correct - you need to use "db" as the DBHost in the site/config.php file for ddev because MySQL/Maria is running in a separate container called "db" in the ddev stack. Both the webserver container and database container are attached to a dedicated virtual network when you bring up your stack. Docker's DNS resolver automatically makes the internal network IP of the database server available to other containers on the same virtual network using the container name - hence the need for "db" in the config file. In docker stacks where both the webserver and MySQL/Maria DB were running in the same container then you could use "127.0.0.1" or "localhost" as the DBHost - but that's not the case for ddev.
  14. @SIERRA How are you processing the admin page submission in order to populate your SMS template and send it? Presumably you are using hooks, right? Take a look at AdminCustomFiles for inserting custom JS into admin pages.
×
×
  • Create New...