diff --git a/backend/main.py b/backend/main.py index d90db67..55458a0 100644 --- a/backend/main.py +++ b/backend/main.py @@ -80,7 +80,16 @@ if __name__ == "__main__": if environment == 'test': cert_path = "ssl/mx-aare-test.psi.ch.pem" key_path = "ssl/mx-aare-test.psi.ch.key" + host = "0.0.0.0" # Bind to all interfaces + else: + host = "127.0.0.1" # Default for other environments # Run the application with appropriate SSL setup - uvicorn.run(app, port=8000, log_level="debug", - ssl_keyfile=key_path, ssl_certfile=cert_path) + uvicorn.run( + app, + host=host, + port=8000, + log_level="debug", + ssl_keyfile=key_path, + ssl_certfile=cert_path, + ) \ No newline at end of file diff --git a/frontend/src/components/DewarDetails.tsx b/frontend/src/components/DewarDetails.tsx index ff20885..c02b3bb 100644 --- a/frontend/src/components/DewarDetails.tsx +++ b/frontend/src/components/DewarDetails.tsx @@ -229,7 +229,7 @@ const DewarDetails: React.FC = ({ const validateEmail = (email: string) => /\S+@\S+\.\S+/.test(email); const validatePhoneNumber = (phone: string) => /^\+?[1-9]\d{1,14}$/.test(phone); - const validateZipCode = (zipcode: string) => /^\d{5}(?:[-\s]\d{4})?$/.test(zipcode); + const validateZipCode = (zipcode: string) => /^\d{4,5}(?:[-\s]\d{4})?$/.test(zipcode); if (!dewar) return No dewar selected.;